Java

Components involved in creating a robust Micro Service Architecture

In this article, we will learn in brief about various software components that are required in building a robust Micro Services Application. Before understanding each architectural component in brief, we will state general queries that comes up while designing Micro Services Architecture.
 
 
 
 
 
 

1. Micro Services Architecture Components

Whenever we are creating a Micro Services Application, the following questions come to our mind

  • How will we register micro services so that clients can use that registration information(Service Discovery) and call in a Micro Service?
  • How will we ensure that micro services application which is built is completely fault tolerant and highly available?
  • How will we make sure that there is a single interface given to the client which reduces a lot of client side efforts and makes that Micro Services application very easy to use?
  • How to load balance incoming requests to micro services seamlessly?

Please see architectural diagram below and lets understand whether components involved in building the architecture solves all of the questions stated above:

Micro Services Architecture Components
Micro Services Architecture Components

1.1 Netflix Eureka Server

Netflix Eureka acts as a discovery server wherein a Micro Service after coming up registers itself as a discovery client. Netflix Eureka provides a REST interface to the outside for communicating with it. Eureka also has another software module called Eureka Client through which it alternately interacts with a Eureka Server for service discovery. Eureka Client also comes with inbuilt Load Balancer to load balance incoming client Requests.

Netflix Eureka Server is an answer to Question 1 above.

1.2 Hystrix Server

Hystrix acts as a fault tolerant resilient system which is used to avoid complete failures of software application. It does this by providing a kind of Circuit breaker mechanism in which a circuit remains closed when application is running smoothly without any issues. If there are errors continuously encountered in the application then Hystrix Server Circuit opens and any further requests to a calling service are stopped by Hystrix and instead requests are diverted to a fall back service. In this way it provides a highly resilient system.

Hystrix Server is an answer to Question 2 above.

1.3 Netfilx Zuul Server

Netflix Zuul Server acts as a kind of Gateway Server wherein all the client requests hva to pass through it, so its acts as a kind of unified interface to a Client. Client uses a single communication protocol to communicate with all the Micro Services and Zuul server is in turn entrusted with the responsibility of calling various micro services with its appropriate communication protocols. Netflix Zuul also has an inbuilt Load Balancer to load balance all the incoming requests from the client.

Netflix Zuul Server is an answer to Question 3 above.

1.4 Netflix Ribbon

Netflix Ribbon acts as a kind of Load Balancer wherein it load balances all the incoming requests from the client. It uses a basic Round Robin Load Balancing strategy by default though you can configure it to use any other alternate Load Balancing mechanisms. Netflix Zuul Server has inbuilt Netflix Ribbon embedded with it. If you want to use Netflix Ribbon independently, we have to provision appropriate Maven packages of Netflix Ribbon for using it in any application.

Netflix Ribbon Server is an answer to Question 4 above.

2. Conclusion

In this article, we saw a brief overview on all the software components which goes in building a Micro Services application. In next article we will try to understand the working of Netflix Eureka in detail.

Shivshankar Shet

Technology enthusiast currently working in position of a Principal Architect with 12+ years of IT experience in Java/J2EE related technologies. His main expertise includes building distributed systems, data analytics, cognitive computing.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
Back to top button