Microservices
Sakshi Agrawal
immediate joiner | Backend Developer | Java |Spring Boot|Microservices|Hibernate|Jenkins|Bitbuket|Kubernetes|kafka|Putty|Cassandra|Software Engineer
Hello to my all Readers!....
Hope You All are having good Reading
Below I'm sharing my learning regarding Technical Concept (Microservices). Have a glance on this and enjoy your reading. Hope you all might get benefited from it!
Q. What is Microservice?
Microservice?is a Service Oriented Architecture. In the microservice architecture, there are a large number of?microservices. By combining all the microservices, it constructs a big service. In the microservice architecture, all the services communicate with each other.
Some Key Points of Microservice-
- Not a framework or API
- It is a design pattern to develop applications
- Using Microservices we can develop application with loosely coupling
- Instead of developing all functionalities in single application we will divide them into multiple services (microservices)
Q. What are advantages with microservices-
- Rapid development
- We can use multiple programming languages (Independent technologies)
- Fast Development
- Quick Releases
- Easily deployable, manageable and maintainable
Q. What are the Challenges with Microservices
- Bounded context(Deciding how many microservices we need to develop in a project ?)
- Duplicate Configuration (In every microservices me we need to write some common configurations)
- Visibility (All team members will not get the chance to work with all microservices)
- Pack of cards (If main microservice failed then rest of the services will become useless)
Q. What is the architecture for Microservices ?
- There is no fixed architecture for microservices
- Companies/ people are customizing Microservices architecture as per their project requirement.
Basic Architecture of Microservice
Note: They are optional as per the requirement it can change . It is generalized architecture.
Q. What are the components used in Microservice ?
- Netflix Eureka Naming Server (Service Registry)
- ?Admin Server
- Zipkin Distributed Tracing Server
- ?AIPs/ Services
- Netflix Ribbon (FeiginClient)
- Netflix Gateway Server
Q. What is Service Registry (Eureka) ?
- use to register all the services/ rest api's available in project
- It will? provide all services details like name, status ,url etc..
- It provides a user interface to monitor all the details.
Note- @ EnableDiscoveryClient – use to make sure our application will search for Eureka server and register with Eureka server.
?Q. What is Admin Server ?
- ?It is use to monitor and manage all the services at one place
- ?It provides user interface to monitor and manage our apis
?(Actuators endpoints, LOG level changes without restarting server etc..)
?
Q. What is Zipkin Server?
- ?It is used for distributing log tracking
- ?We can find which rest api/ service taking more time to process a request
- ?It provides a user interface to monitor services/ rest apis execution details.
?
Q. What are AIPs/ Services?
- APIs contains actual business logic of our applications
- APIs means our RESTFul services (REST APIs)
- Every API is called as one? Microservice
- Every API is responsible to perform one action /operation
?Ex: Payment api, report api, admin api, dashboard api, search api etc…
领英推è
?
?Q. What is? FeiginClient ?
- FeiginClient is used to implement Interservice Communication
- Communication between 2 microservices with in same project is called interservice communication.
Q. What is ?API Gateway ?
- ? It will act as front gate for backend apis
- ??Acts as mediator between end user? requests and backend apis
- ??We will write filters + Routers here
- ??Using filter we can validate the request(security)
- ? Routers are used to forward the request specific backend api.
Q. What is load Balancing?
Is the process of distributing load to multiple server
Application without Load Balancer:-
- if we deploy our application in single server than that server is responsible to handle all the requests
- if too many requests comes at a time then burden will increase on server ,If burden increases
-?server may not handle?
? -?requests processing will take more time.
-?users need to wait for the response
-?server might crash
- we will lose customers And business.
??To overcome all above problems we will use load balancer
Application with load balancer-
??Instead of running applications on a single server , We will run our application on multiple servers.
- Application will be deployed into multiple servers
- End users request will be received by load Balancer
- LBR will? distribute the load to servers in Round Robbin Fashion?
????Round Robbin Fashion-? one faster other…
?????????????????????????????????????????1st request go to 1st server
?????????????????????????????????????????2nd request go to 2nd server
?????????????????????????????????????????3rd request go to 3rd server
????????????????????????????????????????4th request go to 1st server and so on….
- If any one server got crashed still requests will be handled by other server which are up and running
- In all servers same application will be deployed
Conclusion:-
In the above article we have discuss some of the basic introduction of Microservice and its architecture.
Thankyou For Reading!
Published by:?Sakshi Agrawal
Date?:?March 30,2023