Amir-Mousavi
Amir-Mousavi

Reputation: 4563

resilient microservices design pattern

in reactive programming Resilience is achieved by replication, containment, isolation and delegation.

two of the famous design patterns are Bulkheads with supervisor and circuit breaks. are these only for reaching isolation and containment?

what are the most famous design patterns for microservices and specially the ones give resiliency?

Upvotes: 1

Views: 580

Answers (3)

Koenigsegg
Koenigsegg

Reputation: 625

You can implement various resilience patterns to achieve different levels of resilience based on your needs.

  • Unit Isolation –split systems into parts and isolate the parts against each other. The entire system must never fail.
  • Shed Load – Implement a rate limiter, which sheds any extra load an application can’t handle, to ensure than an application is resilient to spikes in the number of requests. any request that is processed by an application consumes resources like CPU, memory, IO, and so on. If requests come at a rate that exceeds an application’s available resources, the app may become unresponsive, behave inconsistently, or crash.
  • Retry – enable an application to handle transient failures when it tries to connect to a service or network resource, by transparently retrying a failed operation.
  • Timeout – wait for a predetermined length of time and take alternative action if that time is exceeded.
  • Circuit Breaker – when connecting to a remote service or resource, handle faults that might take a variable amount of time to recover from.
  • Bounded Queue – limit request queue sizes in front of heavily used resources.

Upvotes: 0

Sunil Singhal
Sunil Singhal

Reputation: 603

Other than BulkHead and CBs, few other things that can be implemented:

  • Retry Pattern on Idempotent Ops. This requires the Operation to be retried is Idempotent and will produce the same results on repeated execution.
  • Proper Timeout Configurations like Connection, Command Timeouts in case of network dependency
  • Bounded Request Queues at Virtual Host/Listener level
  • Failover Strategy like Caching

Redundancy, Failover Systems can be incorporated to achieve resiliency against system failures as well

Upvotes: 0

Allan Sene
Allan Sene

Reputation: 469

Reactive Programing can not be just resumed in design patterns. There are many considerations about systems architecture, dev ops and so to have in mind when you are designing high performance and availability systems.

Specifically, about resiliency, you should be thinking, for example, in:

Upvotes: 0

Related Questions