Microservices Architecture : A Beginners Guide

·

3 min read

What exactly is Microservices?

Microservice can be defined as smallest unit of service that accepts incoming requests in order to perform some action. It can either be a backend server or a function that is up 24*7 or a function that is invoked every time an event occurs. Basically it can be considered as a backend service deployed on another server. One may say that microservices are like a combination of individual, independent modules of a monolithic application that are split across the computer network and work independently instead of working in a single processor / computer.

Benefits of Microservices

  • Scalability: Microservices allow applications to scale independently based on usage and making it possible to handle huge incoming traffic.

  • Flexibility: Given that , microservices consists of individual components so each individual component / service /module can be developed independently having it's own logic thus offering flexibility to the developers.

  • Maintainability: Microservices are easy to maintain since each service is is developed and maintained individually so it is easy to maintain and it also does not affect the rest of the application.

  • Agility: Microservices allow for faster development and deployment of new features, as individual services can be developed and deployed independently.

Spotify and Microservices

Our very favorite online music streaming platform Spotify was one of the first few businesses to champion the advantages of microservices. Spotify has many microservices that are handled and scaled independently and handle the incoming traffic to serve requests. Each microservice is developed . deployed and scaled individually that allows Spotify to roll out new features easily in a less time. It enables Spotify to handle huge traffic and deliver various services simultaneously.

Why did Spotify choose Microservice?

Spotify requires many services at the backend in a given time to process user request like song recommendation , song search , song sharing or even user authentication . In order for smooth processing of a user request , a microservice basically communicates with a given service and sends response back to the user.

Spotify uses a backend service called 'access point' that constantly communicates with various clients for swift communication.

Since Spotify uses microservices , so for each individual microservice there is a separate database with separate logics. These microservices along with various other services are responsible for the swift music streaming on Spotify.

Implementing changes in a microservice architecture is also quite easy since each microservice has it's own logic , so implementing a change for a particular microservice is quite easy and doable.

Click here to read an amazing case study on how microservices helped lastminute(.)com !

Conclusion

In wrapping up our exploration of microservices, it's evident that this architectural approach has become a linchpin for modern software development. Real-world examples have illuminated the successes of organizations leveraging microservices, underscoring the practicality of this architectural paradigm. From industry giants to startups, the adaptability of microservices has proven instrumental in meeting the demands of an ever-evolving digital landscape.