liveBook · Manning

Denial-of-service attack

As explained in Distributed Machine Learning Patterns

A denial-of-service attack is an intentional or accidental activity that overwhelms a service with requests and prevents authorized access or normal operation.

A denial-of-service attack overwhelms a model-serving system with requests, interrupting authorized access or consuming shared computational resources needed by other services. The cause may be malicious, accidental, or a client misconfiguration. section 4.4.2

A practical defense uses rate limiting to control request pressure:

  • Place incoming model-serving requests in a queue. section 4.4.2
  • Process only the number of concurrent requests allowed by the current limit. section 4.4.2
  • Continue with queued requests after active requests finish. section 4.4.2

Two-request concurrency limit

Four requests arrive, but a limit of two concurrent requests admits only two initially; the remaining requests wait until capacity becomes available. section 4.4.2

Figure 4.17 A flowchart of four model serving requests sent to the model serving system. However, only two are under the current rate limit, which allows a maximum of two concurrent model serving requests. Once the system has finished processing those two requests, it will proceed to the remaining two requests in the queue.
04-17

Visualizes how a rate-limiting queue admits requests in bounded groups and releases queued work as processing completes. section 4.4.2

How Distributed Machine Learning Patterns covers it

How deep it goes
Explains malicious and accidental causes, then gives a queue-based rate-limiting workflow with bounded concurrency.
Examples
Uses misconfigured clients, accidental load tests, unexpected traffic spikes, and four requests constrained to two concurrent operations.
What it assumes
Assumes a model-serving system that draws computational capacity from a shared resource pool.
What you can do after
Operate/configure request queues and concurrency limits to defend model-serving systems against excessive request load.
How it connects
Connects denial-of-service attacks to model serving, shared resource pools, event-driven processing, and rate limiting.

Also explained in

Compare how 4 books explain denial-of-service attack →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Distributed Machine Learning Patterns. The section links point to the parts of the book it draws on.