Microservices Blogs

BigQuery is Google’s fully managed, petabyte scale, low cost analytics data warehouse. It's Serverless, highly scalable, and cost-effective multicloud data warehouse designed for business agility. Read more

The world is a stage where all of us are artists and Constant learning is the foundation of success.In order to continue your learning with Read more

The world is a stage where all of us are artists and Constant learning is the foundation of success.In order to continue your learning with Read more

The world is a stage where all of us are artists and Constant learning is the foundation of success.In order to continue your learning with Read more

Spring Cloud provides a different type of built in filters .So, they are many different type of Spring cloud Gateway filters. Also, we can create Read more

Overview: Hello everyone, let's take an overview of this blog. In this blog, I will discuss how we can compare spring cloud gateway with eureka Read more

Route Predicate Factories The Spring Cloud Gateway compares the routes of the incoming request as part of Spring WebFlux HandlerMapping infrastructure. It has many pre-defined Read more

In this blog, we are going to see the dynamic configuration of Spring Cloud Gateway routing. The configuration of Spring Cloud Gateway can be control Read more

Spring Cloud Gateway provides a library for building an API Gateway on top of Spring WebFlux. Spring Cloud Gateway aims to provide a simple, yet Read more

Global filters are executed for every route defined in the API Gateway. The main difference between pre-filter and post-filter class is that the pre-filter code is Read more

Spring Cloud Gateway Spring Cloud Gateway provides a library for building API gateways on top of Spring and Java. It provides a flexible way of Read more

In a distributed environment, services need to communicate with each other. However, this is interservice communication. We also have use-cases where a client outside our Read more

Filters act as the place where you can modify the incoming requests before sending the requests to the internal microservices or before responding back to Read more

Security,As we all know that everything that is on the Internet need security. Especially when you create software and work with sensitive user data, such Read more

Actuator Actuator is a library which is provides many beneficial features and are production-ready to be utilised in our application. The main features of this Read more

Overview: Hello everyone, In this blog, we will deep down into routing predicate factories. Firstly we will know about what is a routing predicate factory? Read more

For authenticate the users, we need two things: user account records and an OAuth2 compatible authentication provider (server). There are many commercial OAuth2 authentication providers Read more

There is a clear understanding that everything that is exposed to the Internet should be secured. Especially when you create software and work with sensitive Read more

Spring Cloud Gateway Spring Cloud Gateway(SCG) provides a library for building API gateways on top of Spring and Java. It aims to provide a simple, Read more

Reverse Proxy The reverse proxy is a server used in communication between the external clients and the internal applications. With the help of reverse proxy Read more

Routing is an integral part of a microservice architecture. For example, `/` may be mapped to your web application, `/api/users` is mapped to the user service and `/api/shop` is mapped to Read more

Reading Time: 3 minutes

In this growing world, where number of users for softwares are increasing day by day, we need softwares that are easy to manage, easy to modify and easy to scale to handle the traffic. Several technologies, architectural patterns, best practices have emerged over these years. Microservices is one of those architectures that have emerged. In this blog, we will learn about microservices. So, let’s get started !

Why Microservices?

Even before knowing what is microservice it’s good to know why this concept of microservices architecture emerged.

Before microservices, the companies used monolithic architecture. In monolithic architecture there is one big system, just like a container that has all the software components.

Limitations of Monolithic
  • Inflexible – It is difficult to use different technologies in a monolithic.
  • Unreliable – A failure in one component is capable of bringing down the whole monolithic.
  • Unscalable –There is limitation to scaling as components must be scaled as a group. Also, it can only scale as far as the database allows.
  • Blocks Continuous Development – Sometimes simultaneous development and deployment is not possible.
  • Slow Development – Development is slow as building time is more.
  • Deep Coupling – Features of complex applications have tightly coupled dependencies

The above challenges were the main reasons that led to the evolution of microservices. 

What is Microservice?

Microservices, aka Microservice Architecture, is an architectural style that has multiple small autonomous services that together makes an application.

Some of the points to remember about microservice is :

  • Each small service serves a single functionality of the business domain. In other words, each service represents a logical part of domain.
  • All the services are independent
  • Services use API for communicating with each other. So, having API for each service is important.
  • All the services need to be deployed independently.
  • There is loose coupling between the different components of application, resulting in easy building, altering and scaling of the application.
  • Rapid deployments are possible.
  • In microservices there is no standard technology. A developer can choose the best tools as per their service requirement.
  • Developer or team can work independently of each other.

Pros of Microservices

Advantages of using Microservices
  • Independent Development : As each microservice serves a different purpose therefore they can be developed independently.
  • Independent Deployment : A microservice can be deployed when it is ready independently. It does not matter whether other microservices are ready for deployment.
  • Fault Isolation : If there is a fault in a single service then it does not propagate to other services.
  • Scalability : We can scale each service individually. If there is a need for scaling “Service A” as it is getting more traffic then it can be scaled without scaling the other services or whole application.
  • Increased Availability : Fault in one service does not affect the other, therefore availability is increased.
  • Mixed Technology Stack : Every service can use the technology that is best suited.

Cons of Microservices

  • Communication between Services : Since everything is now an independent service, you have to carefully handle requests traveling between your modules.
  • Deployment challenges : Having multiple services means multiple deployments. So here, managing multiple deployments is a crumblesome task in itself.
  • Global Testing : Testing an application as whole is difficult. So, you have to test each service individually for testing the whole application.
  • Cross-Service Refactoring : If a need arises that demands change in single service then it is easy but change in multiple services could be a problem. Consider a situation in which relationship between different service is misunderstood. So now if you have to refactor that would be difficult.

Also, you should focus on building reactive microservices. Just a microservice will do no good.

I hope this blog was helpful for you and you could get an idea about microservices.

Reference