mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-14 18:58:44 +00:00
4108f86177
* Changed database implementation. Removed static objects. * Fix Logs * Fix 40 errors from checkstyle plugin run. 139 left)) * Fix CacheStore errors from checkstyle plugin 107 left * Fix last errors in checkstyle. * Fix sonar issues * Fix issues in VALIDATE phase * Fix Bug with mongo connection. Used "Try with resources" * Add test * Added docker-compose for mongo db. MongoDb db work fixed. * Provided missing tests * Comments to start Application with mongo. * Fix some broken links * Remove extra space * Update filename * Fix some links in localization folders * Fix link * Update frontmatters * Work on patterns index page * Work on index page * Fixes according PR comments. Mainly Readme edits. * fix frontmatter * add missing png * Update pattern index.md * Add index.md for Chinese translation * update image paths * update circuit breaker image paths * Update image paths for localizations * add generated puml * Add missing image * Update img file extensions * Update the rest of the EN and ZH patterns to conform with the new website Co-authored-by: Victor Zalevskii <zvictormail@gmail.com>
35 lines
1.4 KiB
Markdown
35 lines
1.4 KiB
Markdown
---
|
|
title: Queue based load leveling
|
|
category: Concurrency
|
|
language: en
|
|
tags:
|
|
- Decoupling
|
|
- Performance
|
|
- Cloud distributed
|
|
---
|
|
|
|
## Intent
|
|
Use a queue that acts as a buffer between a task and a service that it invokes in order to smooth
|
|
intermittent heavy loads that may otherwise cause the service to fail or the task to time out.
|
|
This pattern can help to minimize the impact of peaks in demand on availability and responsiveness
|
|
for both the task and the service.
|
|
|
|
## Class diagram
|
|

|
|
|
|
## Applicability
|
|
|
|
* This pattern is ideally suited to any type of application that uses services that may be subject to overloading.
|
|
* This pattern might not be suitable if the application expects a response from the service with minimal latency.
|
|
|
|
## Tutorials
|
|
* [Queue-Based Load Leveling Pattern](http://java-design-patterns.com/blog/queue-load-leveling/)
|
|
|
|
## Real world example
|
|
|
|
* A Microsoft Azure web role stores data by using a separate storage service. If a large number of instances of the web role run concurrently, it is possible that the storage service could be overwhelmed and be unable to respond to requests quickly enough to prevent these requests from timing out or failing.
|
|
|
|
## Credits
|
|
|
|
* [Queue-Based Load Leveling pattern](https://docs.microsoft.com/en-us/azure/architecture/patterns/queue-based-load-leveling)
|