git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Christopher Lindee <christopher.lindee@webpros.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH 0/2] Optionally support push options on up-to-date branches
Date: Fri, 15 Mar 2024 20:29:12 +0000	[thread overview]
Message-ID: <ZfSvmOWrsT2dFnG5@tapette.crustytoothpaste.net> (raw)
In-Reply-To: <SA1PR14MB46911007FDFE3FFADB4FB3A68D282@SA1PR14MB4691.namprd14.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1876 bytes --]

On 2024-03-15 at 08:58:35, Christopher Lindee wrote:
> Is this a potential avenue for DoS?

No, it's not.  In our implementation, there is a functional limit on ref
updates and if you exceed it, the operation fails.  We also have rate
limiting that estimates future cost based on the cost of previous
requests and delays or fails requests which are projected to exceed a
reasonable threshold.  (Thus, you can make many more cheap requests, or
fewer expensive ones, your choice.)  All of this is per-repository, so
generally only you (and maybe your colleagues or collaborators)
experience negative consequences if you attempt excessive use.

I can't speak to other implementations, but robust rate limits are
typically common.  I'm sure all major implementations open to the public
have some sort of rate limiting because otherwise they'd be down a lot.

The difference is that failing operations and even well-explained,
well-documented rate limits cause a poor user experience, user
frustration, and user inquiries (e.g., support requests), as well as
possibly noisy alerting and potentially pages for engineers.  Anytime a
user experiences rate limits, they have to make a change in their
behaviour, and people don't like change.

I'd prefer we left the default to do the cheap no-op because, as I said,
that scales much better, and thus we allow users to do the obvious thing
for much longer and it just works for them.  That, in turn, provides
everyone a better experience.

Certainly, if people start using this option by default, then it will be
a problem if they engage in excessive use and server implementations
will probably scale worse, but usually users don't use non-default
options unless they need them, so I don't think your new proposed option
is a problem.
-- 
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2024-03-15 20:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 21:55 [PATCH 0/2] Optionally support push options on up-to-date branches Christopher Lindee
2024-03-13 22:58 ` Junio C Hamano
2024-03-14 22:55   ` brian m. carlson
2024-03-14 23:29     ` Junio C Hamano
2024-03-15  0:04       ` Chris Torek
2024-03-15  0:57         ` brian m. carlson
2024-03-15  0:19       ` Christopher Lindee
2024-03-15 15:42         ` Junio C Hamano
2024-03-15  0:39       ` brian m. carlson
2024-03-15  8:58         ` Christopher Lindee
2024-03-15 20:29           ` brian m. carlson [this message]
2024-03-15  0:11     ` Christopher Lindee
2024-03-14 23:08   ` Christopher Lindee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZfSvmOWrsT2dFnG5@tapette.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=christopher.lindee@webpros.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).