Microservice
A Microservice is a online software service that is loosely coupled from other online services (with a single responsibility).
- Context:
- It can (typically) be independent deployable, language independent, platform independent, and technology independent (from other components).
- It can (often) be referenced in a Microservices-based Architecture.
- It can range from being a Nanoservice to being a Heavy Microservice.
- ...
- Example(s):
- Amazon's Product Page Buy Button Service; Amazon's Tax Calculator Service.
- …
- Counter-Example(s):
- a Monolithic Service.
- a Data Dump.
- See: Service Mesh, Language-Independent Specification, Application Programming Interface, Service (Systems Architecture), Coupling (Computer Programming), Modularity, Distributed System.
References
2020
- (Wikipedia, 2020) ⇒ https://en.wikipedia.org/wiki/microservices#Introduction Retrieved:2020-7-17.
- There is no single definition for microservices. A consensus view has evolved over time in the industry. Some of the defining characteristics that are frequently cited include:
- Services in a microservice architecture (MSA) are often processes that communicate over a network to fulfill a goal using technology-agnostic protocols such as HTTP. * Services in a microservice architecture are independently deployable.[1] * Services are organized around business capabilities. * Services can be implemented using different programming languages, databases, hardware and software environment, depending on what fits best. * Services are small in size, messaging-enabled, bounded by contexts, autonomously developed, independently deployable, decentralized and built and released with automated processes.
- A microservice is not a layer within a monolithic application (example, the web controller, or the backend-for-frontend). Rather it is a self-contained piece of business functionality with clear interfaces, and may, through its own internal components, implement a layered architecture. From a strategy perspective, microservices architecture essentially follows the Unix philosophy of "Do one thing and do it well". Martin Fowler describes a microservices-based architecture as having the following properties: * Lends itself to a continuous delivery software development process. A change to a small part of the application only requires rebuilding and redeploying only one or a small number of services. [2] * Adheres to principles such as fine-grained interfaces (to independently deployable services), business-driven development (e.g. domain-driven design). [3] It is common for microservices architectures to be adopted for cloud-native applications, serverless computing, and applications using lightweight container deployment. According to Fowler, because of the large number (when compared to monolithic application implementations) of services, decentralized continuous delivery and DevOps with holistic service monitoring are necessary to effectively develop, maintain, and operate such applications. A consequence of (and rationale for) following this approach is that the individual microservices can be individually scaled. In the monolithic approach, an application supporting three functions would have to be scaled in its entirety even if only one of these functions had a resource constraint. With microservices, only the microservice supporting the function with resource constraints needs to be scaled out, thus providing resource and cost optimization benefits.
- There is no single definition for microservices. A consensus view has evolved over time in the industry. Some of the defining characteristics that are frequently cited include:
2020
- https://docs.datadoghq.com/tracing/visualization/
- QUOTE: ... Services are the building blocks of modern microservice architectures - broadly a service groups together endpoints, queries, or jobs for the purposes of scaling instances. Some examples:
- A group of URL endpoints may be grouped together under an API service.
- A group of DB queries that are grouped together within one database service.
- A group of periodic jobs configured in the crond service.
- QUOTE: ... Services are the building blocks of modern microservice architectures - broadly a service groups together endpoints, queries, or jobs for the purposes of scaling instances. Some examples:
2018
- (Wikipedia, 2018) ⇒ https://en.wikipedia.org/wiki/Microservices Retrieved:2018-9-27.
- … In a microservices architecture, services are fine-grained and the protocols are lightweight. The benefit of decomposing an application into different smaller services is that it improves modularity and makes the application easier to understand, develop, and test and more resilient to architecture erosion. It parallelizes development by enabling small autonomous teams to develop, deploy and scale their respective services independently. It also allows the architecture of an individual service to emerge through continuous refactoring. Microservices-based architectures enable continuous delivery and deployment.
2017
- https://martinfowler.com/articles/microservice-testing/#definition
- QUOTE: A microservice architecture is the natural consequence of applying the single responsibility principle at the architectural level. This results in a number of benefits over a traditional monolithic architecture such as independent deployability, language, platform and technology independence for different components, distinct axes of scalability and increased architectural flexibility. …
… Microservices are often integrated using REST over HTTP. In this way, business domain concepts are modelled as resources with one or more of these managed by each service. In the most mature RESTful systems, resources are linked using hypermedia controls such that the location of each resource is opaque to consumers of the services. See the Richardson Maturity Model for more details.
Alternative integration mechanisms are sometimes used such as lightweight messaging protocols, publish-subscribe models or alternative transports such as Protobuf or Thrift.
Each microservice may or may not provide some form of user interface.
- QUOTE: A microservice architecture is the natural consequence of applying the single responsibility principle at the architectural level. This results in a number of benefits over a traditional monolithic architecture such as independent deployability, language, platform and technology independence for different components, distinct axes of scalability and increased architectural flexibility. …
2015
- (Newman, 2015) ⇒ Sam Newman. (2015). “Building Microservices." O'Reilly Media, Inc.,
- BOOK OVERVIEW: Distributed systems have become more fine-grained in the past 10 years, shifting from code-heavy monolithic applications to smaller, self-contained microservices. But developing these systems brings its own set of headaches. With lots of examples and practical advice, this book takes a holistic view of the topics that system architects and administrators must consider when building, managing, and evolving microservice architectures.
Microservice technologies are moving quickly. Author Sam Newman provides you with a firm grounding in the concepts while diving into current solutions for modeling, integrating, testing, deploying, and monitoring your own autonomous services. You’ll follow a fictional company throughout the book to learn how building a microservice architecture affects a single domain.
- Discover how microservices allow you to align your system design with your organization’s goals.
- Learn options for integrating a service with the rest of your system.
- Take an incremental approach when splitting monolithic codebases.
- Deploy individual microservices through continuous integration.
- Examine the complexities of testing and monitoring distributed services.
- Manage security with user-to-service and service-to-service models.
- Understand the challenges of scaling microservice architectures
- BOOK OVERVIEW: Distributed systems have become more fine-grained in the past 10 years, shifting from code-heavy monolithic applications to smaller, self-contained microservices. But developing these systems brings its own set of headaches. With lots of examples and practical advice, this book takes a holistic view of the topics that system architects and administrators must consider when building, managing, and evolving microservice architectures.
- ↑ Nadareishvili, I., Mitra, R., McLarty, M., Amundsen, M., Microservice Architecture: Aligning Principles, Practices, and Culture, O’Reilly 2016
- ↑ Designing microservices: Continuous integration Microsoft Retrieved 9 January 2018
- ↑ Josuttis, N. (2007). SOA in Practice. Sebastopol, CA, USA: O'Reilly. .