helidon-io / helidon-examples

Helidon Examples
Apache License 2.0
6 stars 12 forks source link

4.x: example to show rate limiting using a semaphore #76

Closed barchetta closed 3 months ago

barchetta commented 3 months ago

Add an SE example that shows the following:

  1. Use of WebServers max-concurrent-requests to put a hard limit on number of concurrent requests.
  2. Use of a Sempahore in business logic to implement a simple rate limiter as described in Use Semaphores to Limit Concurrency.

The use case we want to show is gracefully handling a burst of requests while also providing a hard limit.