Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [microservices]

Microservices are small, independent processes that communicate with each other to form complex applications which utilize language-agnostic APIs. These services are small building blocks, highly decoupled and focused on doing a small task, facilitating a modular approach to system-building.

104
votes
5answers
11k views

How does shifting to microservices create a run-time problem?

The following commentator writes: Microservices shift your organizational dysfunction from a compile time problem to a run time problem. This commentator expands on the issue saying: Feature ...
73
votes
7answers
50k views

What is the most accepted transaction strategy for microservices

One of the major issues that I have seen occur in a system with microservices is the way transactions work when they span over different services. Within our own architecture, we have been using ...
63
votes
5answers
19k views

Why is it so bad to read data from a database “owned” by a different microservice

I have recently read this excellent article on the microservice architecture: http://www.infoq.com/articles/microservices-intro It states that when you load a web page on Amazon, then 100+ ...
63
votes
7answers
27k views

How do microservice system architectures avoid network bottlenecks?

I've been reading a lot about microservice architectures for server applications, and have been wondering how the internal network usage is not a bottleneck or a significant disadvantage compared to a ...
55
votes
5answers
21k views

Shared domain model between different microservices

Imagine a scenario of two different microservices. One to handle Authentication within the service, the other one takes care of User Management. They both have a concept of a User, and will talk about ...
42
votes
6answers
14k views

In microservice, is it single database or single database instance for each service?

I understand that a each service in a microservice architecture should have its own database. However, by having its own database, does it actually mean simply having another database within the same ...
34
votes
2answers
9k views

How do you handle shared concepts in a microservice architecture?

I am researching architectural patterns for an application I'm developing and a microservice approach seems like it would be a good choice but I am not sure how to handle interactions between the ...
29
votes
1answer
3k views

When developing a system by myself, should I use microservices?

I'm beginning a new project at work, and will likely be nearly the sole developer on the project, though one or two other developers will need to integrate existing applications or simple scripts into ...
25
votes
3answers
7k views

Ways to share DTO across microservices?

My scenario is as follows. I am designing a system designed to receive data from various types of sensors, and convert and then persist it to be used by various front-end and analytics services later....
23
votes
3answers
6k views

Decentralized Data Management - encapsulating databases into microservices [closed]

I've recently been taking a course on Software design and there was a recent discussion/recommendation about using a 'microservices' model where components of a service are separated into microservice ...
23
votes
4answers
5k views

Microservices and data storage

I'm considering moving a monolithic REST API to a microservice architecture, and I'm getting a bit confused about data storage. As I see it, some of the benefits of microservices would be: ...
23
votes
4answers
5k views

What is the difference between Actor model and Microservices?

Both seem like parallel MPI communicating network of processes. I identify actors with services. Are actors more dynamic (you can create them and kill as breathing whereas service network is more ...
22
votes
4answers
18k views

Should Microservices talk to each other?

I'm designing an application using Micro-Services and I'm unsure on the best mechanism to use to collect data from multiple services. I believe there are two options: Integrate an 'inter-service' ...
21
votes
4answers
16k views

Large file / data transfer in a Microservice Architecture

My company is currently working on adopting a microservice architecture but we are encountering some growing pains (shock!) along the way. One of the key contention points we are facing is how to ...
18
votes
1answer
4k views

SOA/Microservices: How to handle authorization in inter-services communications?

Foreground We are moving from a monolithic platform to a more Service Oriented Architecture. We are applying very basic DDD principles and splitting our domain across different bounded contexts. Each ...
15
votes
6answers
2k views

Autonomous Microservices, event queues and service discovery

I've been reading a lot about micro-services lately, and here are some of the conclusions I got so far (please correct me if I'm wrong at any point). Micro-services architecture goes well with domain ...
14
votes
5answers
6k views

Authorization and authentication system for microservices and consumers

We plan to refactor our company system into a micro-service based system. This micro-services will be used by our own internal company applications and by 3rd party partners if needed. One for booking,...
14
votes
3answers
9k views

Sharing DTO objects between microservices

TL;DR - Is it ok to share a POJO library between services? Generally we like to keep the sharing between services strictly limited to none if possible. There has been some debate whether or not the ...
13
votes
4answers
13k views

Microservices REST or AMQP, which case

I've read many articles concerning microservices architecture and I was wondering when to use AMQP or REST. I've read that loose coupling between services is a good thing and AMQP seems to be a good ...
13
votes
3answers
4k views

API Gateway (REST) + Event-Driven Microservices

I have a bunch of microservices whose functionality I expose through a REST API according to the API Gateway pattern. As these microservices are Spring Boot applications, I am using Spring AMQP to ...
13
votes
1answer
684 views

Should microservices be users?

We are trying to determine the best way to authorise users in a microservice architecture, while ensuring microservices have limited permissions. Our architecture uses a central authorisation service ...
12
votes
3answers
3k views

Scaling monoliths vs. scaling microservices

One of the common arguments for using microservices is better scalability. But I wonder whether this argument is really valid. Lets say we had an application consisting of 10 microservice with 9 of ...
12
votes
3answers
6k views

What should be the scope of a health check for a system which deploys a webapp?

Today I had a task to "write a health check" for a long running service that is an orchestration system to deploy a web-app. I am trying to determine what the scope for such a health check would be, ...
12
votes
3answers
5k views

What is the proper way to synchronize data across microservices?

I am relatively new to microservice architecture. We have a moderately sized web application and I am weighing the pros and cons of breaking it out into microservices instead of a monolithic system we ...
11
votes
3answers
5k views

Microservices without data duplication

I’m finding it hard to avoid data duplication or a shared database for even the simplest microservices design, which makes me think I’m missing something. Here’s a basic example of the problem I’m ...
11
votes
2answers
6k views

User authorization with microservices

Should microservices be responsible for handling their own authorization or you think it's better to have a separate authorization service that is shared across all or a subset (within the same ...
11
votes
2answers
303 views

How do you design your software that updates several microservices, if one of them fails?

Is there a design pattern or practice I can use to help with services that are either down or go down, while others are stable? What if I have three microservices, and two of them are good, and one ...
11
votes
2answers
6k views

Microservice architecture shared domain models

Lets assume that we have a Spring Boot application that uses microservices architecture. Each of the services has its own domain models, but each service must reference a User domain object. What ...
11
votes
4answers
6k views

How to fit a rules engine in a microservice architecture when it requires lots of input data?

Current situation We are implementing (and now maintaining) an online shopping web application in a microservice architecture. One of the requirements is that the business must be able to apply ...
11
votes
1answer
3k views

Why is it such a bad idea to share an interface between server and client?

I was reading the Spring Cloud Netflix documentation when I found out about a way to share an interface between an HTTP server and its client. They use this example for microservices, although there's ...
10
votes
7answers
11k views

Should services talk directly to each other in a microservice architecture?

I have a number of web services that form a web application. Clients can access these services through REST APIs calls. Should these services be able to talk directly to each other? If so wouldn't ...
10
votes
1answer
3k views

Why is 'aggregation' not supported in most API Gateway solutions?

When reading about API Gateway, one of things that come up every single time is that API Gateway is a place where you should aggregate results from multiple endpoints. That sounds really nice. However,...
10
votes
1answer
5k views

Microservice architecture: single database owned by a single service? [duplicate]

We're rebuilding a system in a microservice archiecture. I know the standard practice for SOA is to have each individual service responsible for its own database. However, does it make sense to have ...
10
votes
3answers
2k views

Microservices and isolated data storage models [duplicate]

I have been looking at Microservices for a while now. The concept is not new but it's communicated in a lightweight manner. So, I am very excited about this. However, there is a question that I am ...
10
votes
2answers
7k views

How to consume external RESTful API with Symfony?

We are building a Microservice architecture for our projects, with mostly front-end Symfony applications interacting with back-end RESTful APIs. The problem is this approach is breaking the Symfony ...
10
votes
2answers
4k views

Multi-tenant microservice design

We're in the process of migrating a monolithic application to microservice architecture. Due to some regulatory requirements, we have to keep client's data from different countries in separate (...
9
votes
4answers
2k views

If a microservice architecture needs a separate database per microservice then it's too costly & unmanageable. Why do we even need it?

I read about microservices and it seems illogical to me to create a separate DB per service just to achieve isolation. I can achieve the same using only web services and a single database. Why do we ...
9
votes
5answers
718 views

Microservices: MonolithFirst?

I've been researching microservice architectures trying to get a high level overview of all the pros and cons, whens and whys, etc. A lot of the information I'm reading/watching is coming from ...
9
votes
1answer
4k views

Search across data cross several microservices

I have data for a certain domain distributed between a microservice and a legacy database. I have a search which spans fields on both legacy and microservice database. Previously (before microservice ...
9
votes
2answers
2k views

What is really different between SOA and Microservices

Disclaimer I hope I am not stepping on anyone's toes or offending either concepts' enthusiasts Background I have been looking for real differences between Service Oriented Architecture and ...
9
votes
1answer
600 views

Do Microservices behind an API Gateway need to verify the Access Token?

I have a bunch of microservices that are only accessible externally via an API Gateway. My API Gateway is set up as an OAuth Resource and validates the token (Checks signature etc.) before passing ...
9
votes
3answers
2k views

In a loosely coupled microservices architecture, how do you keep track of your dependencies?

A popular high level architecture choice in modern program is a REST-based microservices system. This has several advantages such as loose coupling, easy re-use, limited restriction on technologies ...
9
votes
4answers
1k views

Handling changes in a event-driven microservice architecture

I'm doing an research-project where I'm researching the options to handle changes in an event-driven microservice architecture. So, let's say we got an application where we got four different ...
8
votes
2answers
8k views

Event sourcing, replaying and versioning

I am designing a system that uses Event Sourcing, CQRS and microservices. I am lead to understand this isn't an uncommon pattern. A key feature of the service needs to be the ability to rehydrate/...
8
votes
2answers
967 views

Zero argument constructors and Always Valid entities

I have done a lot of reading recently about Always Valid domain entities. I have come to believe that in order to ensure the entities are always valid I need to: 1) Remove primitive obsession and ...
8
votes
2answers
5k views

What are the important considerations when switching from monolithic to microservices architecture in .NET? [closed]

We are contemplating breaking up our monolithic monsters into microservices based architecture progressively. We have 5 teams, each team containing 2-3 C# developers, at least 1 database developer, ...
8
votes
3answers
1k views

Where should business logic sit in microservice architecture?

Still trying to wrap my head around microservice architecture since I'm used to a monolithic approach Suppose we try to build a extremely simplified Uber booking system. To simplify things we let's ...
8
votes
3answers
2k views

How to handle foreign key constraints when migrating from monolith to microservices?

My team is migrating from a monolithic ASP.NET application to .NET Core and Kubernetes. The code changes seem to be going as well as can be expected but where my team is encountering a lot of discord ...
8
votes
3answers
1k views

Microservices and shared libraries

We are designing a system based on independent microservices (connected via a RabbitMq bus). The code will (for the first components at least) be written in python (both python2 and python3). We have ...
8
votes
2answers
433 views

Microservices - compensate service failure with queue

We are using some sort of microservices approach in our app (although it is not really consequently adhered to). When a service is down or throwing an exception, the approach is to put it into a ...