Microservices

Microservices

What are Microservices ?

Microservices are an architectural and organizational approach to software development where software is composed of small independent services that communicate over well defined APIs.

Understanding Microservice Architecture

Microservice architecture is a distinctive method of developing software systems that tries to focus on building single-function modules with well-defined interfaces and operations.

The Six Characteristics Of Microservices

* Multiple Components

1. It can be broken down into multiple components services, So that each service can be deployed , tweaked , and redeployed independently without compromising the integrity of an application.

2. This way , you might need to change one distinct service instead of redeploying entire applications.

3. But this approach has its downsides, including expensive remote calls , coarser-grained remote APIs, and more complexity when redistributing responsibilities between components

* Built For Business

1. The microservices style is usually organized around business capabilities and priorities .

2. Unlike a traditional monolithic development approach – where different teams each have a specific focus on, say, UIs, databases, technology layers, or server-side logic – microservice architecture utilizes cross-functional teams.

3. Each team is responsible to make specific products based on individual services communicating via message bus. In microservices, a team owns the product for its lifetime.

* Simple Routing

1. Microservices act somewhat like the classical UNIX system: they receive requests, process them, and generate a response accordingly.

2. That’s where high-tech systems for message routing, choreography, and applying business rules are utilized.

3. You could say that microservices have smart endpoints that process information and apply logic, and “dumb pipes” through which the info flows.

* Decentralized

1. Since microservices involve a variety of technologies, old-school methods of centralized governance aren’t optimal.

2. The microservices community favors decentralized governance so its developers can produce tools that can be used by others to solve the same problems.

3. Monolithic systems use a single logical database across different applications. In a microservice application, each service usually manages its unique database.

* Failure Resistant

1. Like a well-rounded child, microservices are designed to cope with failure. Since several diverse services communicate, it’s quite possible that a service could fail.

2. In these instances, the client should allow its neighboring services to function while it gracefully bows out.

3. This requirement adds more complexity to microservices as compared to monolithic systems architecture.

* Evolutionary

1. It’s an evolutionary design and, again, is ideal for evolutionary systems where you can’t fully anticipate what future devices will access your application.

2. Many applications start based on monolithic architecture.

3. But as several unforeseen requirements surfaced, can be slowly revamped to microservices that interact over an older monolithic architecture through APIs.

Examples of Microservices

* Netflix has a widespread architecture that has evolved from monolithic to SOA. It receives more than one billion calls every day, from more than 800 different types of devices, to its streaming-video API. Each API call then prompts around five additional calls to the backend service.

* Amazon has also migrated to microservices. They get countless calls from a variety of applications – including applications that manage the web service API as well as the website itself – which would have been simply impossible for their old, two-tiered architecture to handle.

Microservice Pros and Cons

The Pros and Cons of Microservices :-

Pros

  • Gives developers the freedom to independently develop and deploy services
  • Can be developed by a fairly small team
  • Developers can make use of the latest technologies
  • The code is organized around business capabilities
  • Starts the web container more quickly, so the deployment is also faster
  • No long-term commitment to technology stack

Cons

  • Due to distributed deployment, testing can become complicated and tedious – and often hinders some of the scaling benefits of microservices
  • Increasing number of services can result in information barriers
  • Being a distributed system, it can result in duplication of effort
  • When number of services increases, integration and managing whole products can become complicated
  • Developers have to deal with the additional complexity of a distributed system
  • Developers have to implement a mechanism of communication between the services

No alt text provided for this image
Monolith vs Microservices
Faizan Shaikh

Cloud Engineer at Cloudside | Passionate About Cloud, Automation & CI/CD Pipelines | Linux | Shell scripting | Git & Github | Jenkins | Ansible | Terraform | Docker | Kubernetes | Aws | Azure | Python

2y

Great work Arpit Sharma

Like
Reply

To view or add a comment, sign in

More articles by Arpit Sharma

  • Amazon Web Services

    About AWS * Amazon Web Services (AWS) is the world’s most comprehensive and broadly adopted cloud, offering over 200…

    1 Comment
  • Microservices Design Patterns

    Microservices is an architectural style that structures an application as a collection of small autonomous services…

    2 Comments
  • JVM(Java Virtual Machine)

    * JVM is a specification that provide runtime environment in which java bytecode can be executed. * JVM is platform…

Insights from the community

Others also viewed

Explore topics