Circuit Breaker Design Pattern Using Netflix Hystrix

Check out this circuit design!
You may also like: Design Patterns in Java: Singleton

1. Introduction

A circuit breaker is an electronic/electrical component that makes a circuit open so that no current can flow through it. It is used to prevent the damage caused by excess current from an overload or short circuit.

Generally, fuses are considered to be a circuit breaker, but there is a subtle difference between circuit breakers and fuses. Fuses operate once and must be replaced but the circuit breaker can be reset to resume the normal operation.

Microservices Architectures: Centralized Configuration and Config Server

In this article, we explore the concept of centralized configuration in the context of microservices.

You Will Learn

  • What a cloud config server is.
  • What centralized configuration is.
  • Why we need centralized configuration in a microservices architecture.
  • What the important features of Spring Cloud Config Server are.

Cloud and Microservices Terminology

This is the second article in a series of six articles on terminology used with cloud and microservices. Part 1 is available here:

Microservics Architecture: Introduction to Spring Cloud

In this article, we focus on Spring Cloud. We talk about the various components under its umbrella.

You Will Learn

  • What Spring Cloud is.
  • The typical challenges in microservices architectures.
  • The challenges that Spring Cloud solves.
  • The important projects under the Spring Cloud umbrella.
  • How Spring Cloud helps you build your microservices architecture.

Introduction to Cloud and Microservices: Challenges and Advantages

This is the second article in a series of five articles on cloud and microservices. Part 1 can be found here:

Redis in a Microservices Architecture

Redis can be widely used in microservices architecture. It is probably one of the few popular software solutions that may be leveraged by your application in so many different ways. Depending on the requirements, it can act as a primary database, cache, or message broker. While it is also a key/value store we can use it as a configuration server or discovery server in your microservices architecture. Although it is usually defined as an in-memory data structure, we can also run it in persistent mode.

Today, I'm going to show you some examples of using Redis with microservices built on top of Spring Boot and Spring Cloud frameworks. These applications will communicate between each other asynchronously using Redis Pub/Sub, using Redis as a cache or primary database, and finally using Redis as a configuration server. Here's the picture that illustrates the described architecture.

Developing Spring Cloud Microservices With a Central Environment

How can developers work simultaneously on the same central Spring Cloud environment?

Developing software based on a microservices architecture is extremely easy when you use Spring Boot and Spring Cloud. Just throw in a few lines of code and you can have a microservice up and running. But how do you develop a real-world application in such an environment? In theory, each microservice is isolated and can be developed alone, but, in practice, this is often not the case. To develop and test your service in the context of the application that uses it requires more than just your microservice to be up and running. So, how can one conveniently develop in a multi-microservices environment?