Questions tagged [microservices]

An architectural approach to developing a single application as a suite of small individually deployable services.

The microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare mininum of centralized management of these services, which may be written in different programming languages and use different data storage technologies.

Microservices Definition by Lewis/Fowler

Properties:

  • The services are easy to replace.
  • Services are organized around capabilities, e.g. user interface front-end, recommendation, logistics, billing, etc.
  • Services can be implemented using different programming languages, databases, hardware and software environment, depending on what fits best.
  • Architectures are symmetrical rather than hierarchical (producer/consumer).

Philosophy:

  • The services are small - fine-grained to perform a single function.
  • The organization culture should embrace automation of deployment and
    testing. This eases the burden on management and operations.
  • The culture and design principles should embrace failure and faults, similar to anti-fragile systems.
  • The services are elastic, resilient, composable, minimal, and complete.

Books:

Besides there are thousands of books that speak about microservices focused on some language like Python or Java or some platforms like Azure or AWS easily to find.

Articles

The following is an great article series from the NGINX Blog.

Sites

9062 questions
35
votes
9 answers

Spring Boot - how to communicate between microservices?

I'm currently working on a Spring Boot microservices project. I have created services and each service is running separately. With this, I need some services to communicate with other services. How can i achieve that? I saw some blogs about this…
Thirumaran
  • 459
  • 1
  • 6
  • 12
34
votes
2 answers

Which HTTP errors should never trigger an automatic retry?

I'm trying to make a few microservices more resilient and retrying certain types of HTTP requests would help with that. Retrying timeouts will give clients a terribly slow experience, so I don't intend to retry in this case. Retrying 400s doesn't…
cahen
  • 15,807
  • 13
  • 47
  • 78
34
votes
7 answers

Data Consistency Across Microservices

While each microservice generally will have its own data - certain entities are required to be consistent across multiple services. For such data consistency requirement in a highly distributed landscape such as microservices architecture, what are…
Santanu Dey
  • 2,900
  • 3
  • 24
  • 38
34
votes
1 answer

How to deploy microservices on Heroku

I have read a lot about microservices, and would like to build my app with that approach. What I know so far is that I nead some services like: load balancer - to deal with every request, and push it forward to another services authorization…
Maciej Treder
  • 11,866
  • 5
  • 51
  • 74
34
votes
6 answers

Microservices: What are smart endpoints and dumb pipes?

I have read an article "Microservices" by Martin Fowler and find it difficult to understand smart endpoints and dumb pipes. Please explain these terms, examples are welcome.
Ivan Voroshilin
  • 5,233
  • 3
  • 32
  • 61
33
votes
3 answers

local development of microservices, methods and tools to work efficiently

I work with teams members to develop a microservices architecture but I have a problem with the way to work. Indeed, I have too many microservices and when I run them during my development, it consumes too memory even with a good workstation. So I…
33
votes
2 answers

what are REST,RESTFul, SOA and microservices in simple terms?

I thought I knew what REST/"RESTFul", restfulservices, webservices, SOA and microservices were but I came across so many different definitions that I reached the conclusion that those terms are overused, misused , or simply badly defined. I hope to…
Lewix
  • 924
  • 1
  • 9
  • 11
32
votes
12 answers

Cannot load driver class: org.h2.Driver in spring boot application

I am trying to learn microservices by creating a dummy project. I have a config repository in git and a config server running at port 8888.It's working properly as I can see my settings as below: Now I have two microservice projects 1) customer…
user2800089
  • 2,015
  • 6
  • 26
  • 47
31
votes
2 answers

Single database vs multiple databases - Microservices Architecture

I am planning to build a project using micro-services architecture. I was curious to know which design would be better in terms of database? Keep a separate database for each service like in the given image Multiple applications point to 1…
Danyal Sandeelo
  • 12,196
  • 10
  • 47
  • 78
31
votes
1 answer

How to split Nest.js microservices into separate projects?

Let's say I want to create a simplistic cinema-management platform. It needs few microservices: movies, cinemas, payments, etc. How would you go about doing it in Nest.js? I don't want them in the same big folder as that feels like making a…
Tomasz Gałkowski
  • 1,841
  • 4
  • 24
  • 39
31
votes
5 answers

Why shared libraries between microservices are bad?

Sam Newman states in his book Building Microservices The evils of too much coupling between services are far worse than the problems caused by code duplication I just don't understand how the shared code between the services is evil. Does the…
31
votes
2 answers

Microservices: REST vs Messaging

I heard Amazon uses HTTP for its microservice based architecture. An alternative is to use a messaging system like RabbitMQ or Solace systems. I personally have experience with Solace based microservice architecture, but never with REST. Any idea…
Apurva Singh
  • 4,534
  • 4
  • 33
  • 42
31
votes
1 answer

How do you manage per-environment data in Docker-based microservices?

In a microservice architecture, I'm having a hard time grasping how one can manage environment-specific config (e.g. IP address and credentials for database or message broker). Let's say you have three microservices ("A", "B", and "C"), each owned…
Steve Perkins
  • 11,520
  • 19
  • 63
  • 95
30
votes
4 answers

Is it recommended to use Database as a container in Production environment?

Assuming we are using a micro service architecture for a product and we decide to use 'Database per service' model, and deploy in cloud servers by provider like AWS. It is convenient to have databases running as a container for development and test…
30
votes
4 answers

How to keep DB in sync when using microservices architecture?

Im about to learn how microservices architecture work. So far i unserstood that each microservice need its own database, which make sense. So lets say we have a customer microservice which is responsible for creating a customer and returning a list…
Timsen
  • 4,066
  • 10
  • 59
  • 117