Posts

Showing posts with the label MIcroservices

Top 10 Microservices Patterns

Image
Mostly used Top 10 Microservices Patterns: 1] API Gateway Pattern Single entry point for all client requests, which then routes those requests to the appropriate microservice 2] Circuit Breaker Pattern used to handle failures in a microservices architecture when a microservice fails or becomes unresponsive, the circuit breaker tips and redirects requests to a fallback service 3] Service Registry Pattern used to keep track of all the services in a microservices architecture. The registry acts as a central directory for service discovery 4] Service Mesh Pattern that involves adding a layer of infrastructure between microservices to handle cross-cutting concerns such as service discovery, load balancing and security  5] Event Driven Architecture Pattern that involves using events to communicate between microservices. Each microservices can publish events and subscribe to events published by other microservices. 6] Saga Pattern used to manage transactions that span multiple microservic...

Spring Boot / Cloud and Microservices

 Microservices with Spring Cloud Spring Cloud Config Server and Bus Load Balancing with Ribbon and Feign Implement Naming Server with Eureka Implement API Gateway with Zuul Distributed Tracing with Zipkin Fault Tolerance with Hystrix RESTful Webservice: REST is a style of software architecture for distributed hypermedia systems Basic:  HTTP Request methods (GET, POST, DELETE, PUT, PATCH) Exception Handling --> Validation HATEOAS HTTP Response Status Code --> 200, 400, 500 series HATEOAS : H ypermedia A s T he E ngine O f A pplication S tate Advanced: Versioning, Swagger, Filtering, Monitoring, Content Negotiations, Internationalizations Tools/Framework:  Spring, Spring Boot, JPA, Maven, Postman MICROSERVICES REST +  Small Well Chosen Deployable Units +  Cloud Enabled (Scale-In/Out Instances)

Top Microservices Patterns

  What are the top microservices patterns? When we dive into Microservices Architecture we can understand it comes with good advantages with some challenges to solve these challenges we need to follow certain patterns. Even Driven pattern - Thumb rule of microservices is to have individual database for each microservices , so you can imagine if you have services which will update database, in this situation you need to implement event driven pattern to maintain consistency between the database tables. Observability Patterns- We need a centralized logging service that aggregates logs from each service instance. For example, if you are using PCF(Pivotal cloud Foundry) does have Loggeregator, which collects logs from each component (router, controller, etc...) of the PCF platform along with applications . These we can connect to the Logger maintain systems like Splunk . Cross-Cutting Concern Patterns - To Explain this Config server is the best example , this is used to externalize th...

Microservices - Software Architecture - Pattern & Techniques

 Advantages Low coupling Improves modularity Make use of parallel development Make use of scalability Drawbacks Infrastructure cost are usually higher Integration testing is bit complex Service management and deployment as single unit Nano service anti pattern (service is too fine grain) Use Cases: 1.] A bank is looking to develop a system for its new web platform that will be a long term project , and will therefore need to be scalable to support future growth Ans] Yes, this would be a suitable application of microservices architecture since it's a long term project, and a well-designed microservices-based system will support good scalability. 2.] An e-commerce website requires a small application that will be used for a short period to support a temporary promotion scheme that they will have.  Ans] This scenario is contrary to that of the previous question, since the application is not complex and will only be used for a short term it can be developed in less development int...

12 - Factor Cloud Based Microservices - App Principles

12-factor app is a methodology or set of principles for building the scalable and performant, independent, and most resilient enterprise applications. 12-factor app is a methodology or set of principles for building the scalable and performant, independent, and most resilient enterprise applications. It establishes the general principles and guidelines for creating robust enterprise applications. 12-factor app principles got very popular as it aligns with Microservice principles. The 12-Factor Principles Codebase (One codebase tracked in revision control, many deploys) Dependencies (Explicitly declare and isolate the dependencies) Config (Store configurations in an environment) Backing Services (treat backing resources as attached resources) Build, release, and Run (Strictly separate build and run stages) Processes (execute the app as one or more stateless processes) Port Binding (Export services via port binding) Concurrency (Scale out via the process model) Disposability (maximize th...