Reactive programming #

One way to implement a microservice is reactive programming. Oftentimes it is stated that microservices must be implemented with reactive technologies.

This section discusses what reactive actually is and determines whether reactive technologies are truly needed for microservices.

Similar to microservices, reactive has an ambiguous definition.

The Reactive Manifesto defines the term “reactive” based on the following characteristics:

Responsive #

  • Responsive means that the system responds as fast as possible.

Resilient #

  • Because of resilience the system remains available even if parts fail.

Elastic #

  • The system can deal with different levels of load, for instance by using additional resources. After the load peak subsides the resources are freed again.

Asynchronous communication #

  • The system uses asynchronous communication (message-driven).

These characteristics are useful for microservices. They pretty much correspond to the features discussed in chapter 2 as essential characteristics of microservices.

At first sight, it seems that microservices, in fact, must be written with reactive technologies.

Get hands-on with 1200+ tech skills courses.