Back-off pattern

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Back off pattern is a behavioral software design pattern that is used when the software developer wants to reduce the usage of system resources.[1]


The pattern typically does some kind of task that is not subject of real-time computing. An example would be the task of sending e-mails, where the end-user waiting several minutes is not a problem. The pattern design will typically implement worker thread that accesses a message queue that holds all unprocessed tasks and regularly check and process these tasks. If there are no tasks the worker thread will sleep for an increasingly long time until there are tasks in the queue again; when this occurs the sleep time is reset.


The pattern is useful on platforms where system resources are scarce, or where you have to pay for system resources like some cloud computing PaaS have.