2.3.4 Overload

Our rule for overload is: reject at the edge, and never discard an accepted order. If a card cannot accept an order now, it tells the client immediately. The order has no stamp. The client sends the same bytes again.

Three limits of each card

  1. Rate limit of the session. Each session has a token bucket on the card. If the bucket is empty, the card answers Rate. One client cannot use all the capacity of a card.
  2. Credit window. A card can hold a fixed number of accepted orders that have no decision. If all credits are in use, the card answers Credits.
  3. Barrier. Near some batch operations, the card stops new orders for a short time. It answers Barrier.

The credit window makes overload safe. An accepted order always has a position in the table of the card. The card always makes a decision for each accepted order: release or rejection.

What the client does

Answer Meaning What the client does
ACK The card accepted the order It waits for the receipt
Rate The bucket of the session is empty It sends again after some milliseconds
Credits The card is full now It sends again after some milliseconds
Barrier Short stop near a batch It sends again after some milliseconds
LATE A stamp was too slow It sends the same order again

The official client does this automatically. A rejection costs time only. It does not use your nonce or your funds. With two or three doors, a rejection at one door does not stop your order: another door delivers it.

Six orders go to a card. The bucket of the session fills. The card rejects two orders immediately, with no stamp. The client sends them again and the card accepts them.
Figure 8. Rejection at the edge. No accepted order is discarded. Loop of 5 seconds.

How the pressure moves back

one site is slow
 -> batches wait for FINAL
  -> the matcher of each site stops new batches
   -> the cards keep their credits
    -> the cards answer Credits
     -> clients send again

No step removes accepted work to make space. Only the number of rejections increases, and clients see them immediately. If two of six sites are dark, the exchange stops. Safety comes before continuity.

What overload does not do

  • It does not change the order of accepted orders.
  • It does not sell a position in the list. There is no fee auction.
  • It does not hide rejections.

Section 3.2 gives the measured throughput of the testnet.

results matching ""

    No results matching ""