Skip to main content
The Veriqa core limits the number of requests to its public routes: the routes are grouped into buckets, and each bucket has its own limit. The defaults are sized for a site with 1,000 users. If you have more or fewer users, multiply the limits by the correction factor N / 1000, where N is your number of users. A limit protects the availability of the service: once a bucket is used up, it answers 429 to everyone who comes after, until the window ends. Size each limit so that it holds the peak minute of your traffic. The core sets no limit per client IP; that limit belongs at the edge of your network (see Preparing for production).

Where the defaults come from

  • A peak of 100 sign-ins a minute. Each of the 1,000 users signs in once or twice a day, which averages one or two sign-ins a minute across the site. The design peak is 10% of the users within one minute, for example at the start of the working day.
  • The whole peak through one channel. A bucket without a key is shared by the whole instance and has to hold the whole peak. A channel’s bucket is sized as if every user signed in through that channel.
  • As many confirmations as sign-ins in the peak minute.
  • A ×2 reserve for page reloads and repeated requests.
  • A 60-second window for every bucket.
Limit = 100 × requests per sign-in × 2, rounded.

Limits for 1,000 users

Paths are given from the root of Veriqa; with Veriqa:PathBase set, they start with that prefix. Each limit is a key of the Veriqa:RateLimit section; the matching …WindowSeconds key sets its window. The /r/… routes exist only when hop mode is on; Veriqa:HopMode:HopPath sets their prefix. email-start counts requests, not emails: its 600 requests a minute per instance hold about 200 sign-ins through Email, three requests each. Emails to one address are limited separately: SignInMailsPerAddress (5 an hour) and MailResendInterval (30 seconds per transaction); see Sending an email again.

Rescaling for your number of users

The correction factor is N / 1000. Multiply every bucket’s limit by it, except user-auth: that limit counts the sign-in attempts of one user and does not depend on the size of the site.
  • A different share in the peak minute. If the share of users who sign in during your busiest minute is not 10%, compute the factor from the peak: P / 100, where P is the number of sign-ins in that minute.
  • Buckets per relying party. confirmation-create and confirmation-result are counted separately for each relying party, so their factor comes from the confirmation peak of one relying party.
  • Several instances. Each instance counts its own requests. With even load balancing, each one gets its share of the peak, and you can divide the limit of one instance by the number of instances.

Examples

A site with 10,000 users. A factor of 10: authorize 2000, token 2500, web-provider-pages 8000. user-auth stays at 5. The limits of the other buckets are multiplied the same way; the example shows four of them.
appsettings.json
An internal portal for 200 employees. A factor of 0.2: authorize 40, token 50, email-start 120. Such a portal also works with the defaults, but it does not need a reserve for 1,000 users: a lower email-start limit caps how many emails go out in a minute if a stream of requests hits the Email form. 1,000 employees whose shift starts at the same time. If 300 people sign in during the first minute of the shift, compute the factor from the peak: 300 / 100 = 3. authorize and callback 600 each, signalr 1200.

Where the limits are set

The limits are read only from the global Veriqa:RateLimit section of the host configuration; a tenant or a single client cannot override them. The full list of keys and their defaults is in the configuration reference.