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.

16
votes
3answers
5k 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....
1
vote
3answers
182 views

Different Redis instances for different microservices?

Say that we have Kubernetes running with n pods, each being a separate microservice. Now, some of those services need a caching layer. When we take into consideration: the fact that Redis was tested ...
0
votes
0answers
17 views

Usage patterns for spring cloud gateway on aws

Consider this setup for a microservices application on AWS. The question is about the API gateway part. AWS has one for managing the API of microservices. It has an authentication mechanism built-in, ...
0
votes
2answers
67 views

Does creating multiple REST services calling each other from a monolithic EJB application right approach to make them microservices later?

We are doing an architectural refactoring to convert a monolithic J2EE EJB application to Spring services. In order to do that I'm creating services by breaking the application against the joints of ...
0
votes
1answer
67 views

Designing alerting micro service

I am working on an application that involves alerts as well as notification policies for multiple users. I am using microservices and am trying to keep them stateless if possible. I have one service ...
0
votes
1answer
61 views

should we consider a feature set as a microservice in FDD?

We are designing the software based on the FDD (feature driven development). Our architecture is microservice. I want to know that microservices are demonstrated by the feature set? In other words, is ...
1
vote
2answers
51 views

How to deal with delayed updates?

I have a microservice-based system that has a product service and a store service. I'm using eventstore to propagate events between microservices, so for example when a product is created, the store ...
0
votes
1answer
28 views

Event sourcing access by reference

In an event sourcing architecture, what is the typical pattern for passing information about related objects (aggregates)? For example, in a order processing system, should OrderCreated event (...
0
votes
0answers
70 views

Microservice Architecture in Azure - Ideas for improving performance

We are about to develop a microservice architecture with azure functions inside azure. We thought about using interservice communication with durable functions. On app site we want to use an async ...
1
vote
1answer
66 views

Why do some eShopOnContainers Service API Unit Tests not reference API classes only WebMVC? [on hold]

I have been trying to learn more about MicroServices architecture and I am using Microsoft's eShopOnContainers as a reference because I am familiar with .NET. I am getting into the part about testing, ...
-3
votes
2answers
37 views

Single micro-service for event-based & time-based notification scheduling [on hold]

We need to send emails and SMS to users which will be triggered by an event like a value change in the database or insertion of a row into the database. Sometimes its time-based trigger like sending ...
3
votes
3answers
580 views

Microservices communication: Avoiding single point of failure

As far as I know, there are two commonly used patterns when dealing with services communication in a microservices architecture: Direct-calling other services. For example: Service A handles some ...
0
votes
0answers
33 views

Which OAuth2 Flow?

I'm just getting into OAuth2 and I'm a tad confused (you've probably heard that before)! I am writing a small independent service which will expose a basic REST API enabling client applications to ...
1
vote
1answer
37 views

How to deduplicate messages coming from having multiple instances of the same observer

I have a web application that is currently of some different services, one instance each. My current goal is to scale some of my services to ensure fail over. One big problem I foresee is that a ...
2
votes
1answer
55 views

Keep Hitting 3rd party API or Store Commonly Queried Data In DB?

Colleague and I have begun a long (and hopefully fruitful) project. I've been building and have come to my first crux, and now I ask the experts of the Stack Exchange for their guidance. I'll keep ...
0
votes
1answer
71 views

Confused about commands, domain events and external events in event sourcing

I'm a little confused about commands role in event sourcing distinction between domain and external events If my understanding is right a command represents an action initiated by an actor in terms ...
0
votes
1answer
45 views

How to solve cache eviction when not using distributed cache in microservices?

Let's say we will not use distributed caching because we want that our microservices are independent and they do not have many single point of failures. Either we will have in-memory cache (simple ...
0
votes
1answer
32 views

Robust locking mechanism between n service instances

I have a job that runs every hour. There can be n identical Node.js microservices running in a stack. The job must be executed only once per hour, though, so I've implemented the following locking ...
1
vote
0answers
41 views

Better approach of testing groups of small services with or without dependency injection

Let's assume, that frameworks I use, provide some kind of dependency injection automatically available in testing environment. Let's also assume, that I have a lot of micro services in my application....
8
votes
3answers
4k 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 ...
0
votes
0answers
24 views

Asp.Net Core: creating files in background

I have a web app with SPA client. When user requests a report, that request should create an excel or pdf file in background and notify user via SignalR. I guess I need to save that file somewhere ...
4
votes
1answer
2k views

Microservices Architecture separating backend and front end

We are trying to move (slowly) into Microservices architecture from our current monolithic based architecture. I've done my research on microservices architecture and would like to get some feedback ...
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 ...
0
votes
0answers
39 views

Breaking a monolith into microservices using templates for similar apps

I have a huge monolith application, a ASP.NET MVC Framework service offering ~50 different "groups" of unrelated data, separated into 50 different controllers/business logics. I was tasked into ...
0
votes
1answer
53 views

Scheduling operations in a micro service

I'm trying to realize a service that executes operations at a certain time, those operations are specified by another service by messaging, here's the scenario: The service A receives a request to ...
1
vote
1answer
95 views

.NET Core Microservice messaging with Amazon SNS and SQS

So I've done some searching but can't seem to find a whole lot of suggestions on this topic. My question is what are some opinions on the best way to receive messages from an Amazon SQS queue on a ....
0
votes
0answers
21 views

AWS Step Functions for a synchron Lambda call from another Lambda

I'm trying to understand AWS Step Functions... so far I understand it as an orchestration among AWS Lambdas in case of distributed processing of a complex task: "Do this, then that, then wait, then ...
0
votes
0answers
92 views

Where should the API reside?

I have a microservice(opsApiServ) which hosts API to do operations(ops). /ops - POST, GET /ops-item - GET ops-item is just a single unit of operation, and ops is collection of operations (ops-item). ...
0
votes
0answers
45 views

How can I stop storing user data twice in two separate services

So I have two services that run, each with their own database. S1 stores user information and other primary data. Users also login and signup via S1 endpoints. S2 stores the same user information and ...
4
votes
4answers
190 views

Splitting application into multiple but keeping database same

I have a medium scale e-commerce application. Over a period of time our monolithic project got quite heavy in terms of code base. I was exploring the solutions for it and found micro-services is one ...
0
votes
1answer
57 views

Microservice on top of an API

I have an Odata API server that I can't change only access it, I can do CRUD operations on it. However I'd like to authenticate users, that are stored on this server. I can retrieve a user (his email, ...
23
votes
4answers
3k 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: ...
0
votes
0answers
54 views

Data replication in microservices

We are trying to move from a monolithic architecture to a microservice architecture. We thought of what would be the best way to segregate our services and started doing so one by one. Now we have a ...
-1
votes
1answer
116 views

Clean Architecture and Microservices

Our team is in the planning stages of creating an enterprise solution for our back office. Our goal is to have one singular entry point for common tasks, such as changing an address or reprojecting a ...
0
votes
2answers
59 views

Data Replication Across Microservice Domains

One of the architectural challenges we are facing on a project is ensuring data consistency over our microservice domains. We have two rules that we are trying hard to enforce: 1. Services cannot ...
0
votes
3answers
151 views

Does a change to a monolith require the whole application to be deployed?

In the book Building Microservices by Sam Newman, on chapter one in the section Ease of Deployment there's a sentence that has left me bothered: "A one-line change to a million-line-long monolithic ...
0
votes
1answer
71 views

How to synchronize databases using event streams?

Say you have a bunch of microservices each accessing dedicated databases. Due to business logic reasons, data from some DBs need to be replicated to other DBs (e.g. to serve as local cache). One way ...
2
votes
1answer
75 views

In a multi-tenant micro-service architecture, who stores the account IDs for each tenant?

I've been doing some research on multi-tenant systems and micro-services and I'm a bit confused by this. If each micro-service has it's own database, and implements the support of multi-tenancy in it'...
-2
votes
1answer
34 views

How to serve the front-end in a Spring microservice architecture?

I want to create the following distributed system: Spring back-end microservices containing the domain logic, a UAA (authentication) service, a Eureka service registry/discovery, a Spring Cloud Config ...
0
votes
0answers
27 views

Microservice auth layer vs each service authorizing requests?

I approached our architect with a solution in which all of our microservices verify the auth of the user invoking the call. Basically, what I've been doing for years, on different projects. He ...
3
votes
3answers
224 views

Aggregation of data from two Microservices

I have two Microservices A and B. B Microservice has a large set of an entity called User. A Microservice stores the User entity in its own DB if User is configured by an agent. There is no flag ...
1
vote
0answers
57 views

Is my microservices architecture in line with best practises? (STS/SPA/Frontend API/Backend services)

My goal is to make an application with a SPA front end that updates in real time, incorporating microservices architecture (and for solutions CQRS design patterns and eventing with Azure Service Bus). ...
0
votes
0answers
105 views

How to handle shared data across microservices?

At my work we have a typical microservice architecture, but one of the issues we are running into is sharing data across multiple services. We have certain data that is used by multiple services and ...
1
vote
0answers
89 views

What are the design patterns and supporting technologies for sharing complex objects between microservices?

Question: Given that two services operate on a common complex object, what are possible design patterns and supporting technologies of exchanging the object and (possibly) sharing the implementation? ...
12
votes
3answers
2k 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 ...
0
votes
1answer
74 views

How to protect while loosely coupling a db server that is shared by 2 different services

Background information I have a database that will be used by two different web applications. Solution A (user driven web application) resides on the public internet and will write / update / delete ...
4
votes
4answers
297 views

Context separation in microservices

I work in a small company and we are about to delve into the Microservices world. As expected, we are hitting a few bumps. Let us focus on a small bounded context: work order. This bounded context is ...
1
vote
1answer
64 views

is Event sourcing using Database CDC considered good architecture?

When we talk about sourcing events , we have have a simple dual write architecture where we can write to database and we can write the events to a queue like Kafka . Other downstream system can read ...
1
vote
0answers
82 views

Authorization, permissions, and scoping resources in a microservice/DDD architecture

I'm building a microservice-based application (services according to DDD) and am about to implement authorization service. There are API gateways and UI applications that access backend servers, and ...
2
votes
1answer
124 views

How to structure microservices in your repository

I am assigned to a project where we have about 20 micro-services. Each of them is in a separate repository without any references to any other, apart from one Nuget package where we maintain some ...