What is microservice? What are the properties of microservice?

What is microservice?

“Microservice Architecture” has no concrete definition but we can describe it as a way of designing software applications that have independently deployable services, intelligence in the endpoints, and decentralized control of languages and data.

Instead of big applications, we should build smaller parts. Each part serves one particular purpose. We call that a service. Single service allows us to loosely couple the applications. Each service can use a different programming language.

Microservice focuses the idea to make these services as small and independent as possible. It is possible to make independent services using a common format and common protocols. For web services, the most popular formats are JSON and XML. The protocol used the most is HTTP.

Properties of microservice

  • Microservice should have it’s own deployment cycle and build around business capabilities
  • Microservice should have it’s own separate database layer
  • Microservice should have it’s own independent codebase, independent CI/CD pipeline, independent testing tools those are not dependent on other services
  • Microservice should have it’s own observability, means it should have independent logging, independent monitoring and independent retry incase of failure
  • Microservice should have it’s own independent security mechanism
  • Microservice should be able to run without waiting for other services to be alive