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.

128 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
1answer
5k views

Handle localization in microservices architecture

I'm developing a multi culture application with different microservices, The microservices communicate with each others with integrations event, so when a new record is inserted the owner of the data ...
4
votes
0answers
167 views

Can an api gateway handle websockets requests besides regular http requests at the same time?

I am working on social platform with a distributed architecture. The platform should offer a chat module, but since the most efficient way to implement a chat is using websockets. I am not sure what ...
4
votes
0answers
473 views

How to implement micro-frontends with Native Apps?

I'm working with Web (react) and Mobile (IOS, Android) teams. And I find that even with a microservices architecture we end up always doing duplicated work at the front end/client level. How to ...
4
votes
1answer
1k views

Using distributed locks in microservice environment

I'm developing distributed system and trying to use best practices of microservice architecture. I was faced with a situation when I think I need something like distributed locks. Since I have not so ...
4
votes
0answers
138 views

How to authenticate third-party callbacks that don't support authentication

I'm working on a project that integrates with a third-party service via API, and the third-party uses callbacks to update us on the status of the operations being performed. These callbacks can be hit ...
4
votes
0answers
131 views

Sharing identical events, with differing scopes, between client and server libraries, in a micro-service architecture

I have a shared user repository (id, name, e-mail, password, etc.) exposed as a REST service - and multiple independent websites accessing this REST service (from the back-end) as a means of sharing a ...
3
votes
0answers
70 views

AWS Serverless Microservice design

I am building an open source task management and note taking service that runs on AWS. I'm building it mostly as a hobby in my spare time and will eventually ship a mobile app that consume it into an ...
3
votes
1answer
228 views

Integration database on micro-services

I need some wisdom on this. Currently I'm learning about micro-services architecture, and so I decided to make a simple project in a micro-services architecture. The project I'm building is just a ...
3
votes
0answers
359 views

Blue-Green Deployment: how to synchronize and maintain data consistency after migration?

To provide zero downtime upgrades of my highload service I use blue green deployment strategy. Every moment data changing happens, so how to migrate all data consistently? In the moment I switch ...
3
votes
0answers
794 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 ...
3
votes
1answer
514 views

Microservices and Modular based front end

I'm a software developer, and the kind of developer we call "front end developer". I'm working on stuff like Angular JS, Angular 2 and others. I wanted to know how we can organize our front end code ...
3
votes
0answers
56 views

I need a web frontend for managing some data. Should I add it to an existing microservice or create a new one?

I work in a company that uses microservices. We have one particular service (let's call it Cart Service for example purposes) that manages some logic (storing carts, allowing other services to add and ...
3
votes
1answer
571 views

CQRS, microservices and delta replication

We have a micro-service that has a Domain Model and have an analytical service for the domain which has its own Query Model. The domain model and the query model are stored in separate persistencies. ...
3
votes
0answers
290 views

When designing an activity-based authorization system, how should additional conditional checks be handled?

When designing an activity-based authorization system, how should additional conditional checks be handled? For example, I have the following authority: VIEW_COMPANY_TRANSACTIONS which allows the ...
3
votes
0answers
765 views

How to design microservices without leader election but job scheduling?

There is a microservices system that is currently using Zookeeper. Let's assume there is just one type of service A that exhibits a simple read of some value t. However, the one of existing A ...
2
votes
0answers
48 views

Automatically extended database-based mutex lock - is it a good idea?

Since I am working in a multi-instance microservice environment, I came accross a problem with making some operations being performed at most by one of the running instances at once. The solution ...
2
votes
1answer
174 views

Microservices: Is the Saga Pattern correctly applied here?

I'm trying to understand and learn how to build microservice messages the best and came up with this task for myself: Services given: Accounts Service Token Service Email Service When a user ...
2
votes
0answers
106 views

Minimizing infrastructure code surface for NodeJS microservices and libraries

My company has about 200 repos for microservices and libraries that we share. It's largely been great, but it's hard to keep DRY at the organizational level. We'll often have a large amount of package....
2
votes
0answers
76 views

I need something and I'm not sure if it's a service registry

I have the following situation, which seems to be coming up in multiple teams/services in our Microservices architecture. We have Service called "Program". A call can be made to create a new program, ...
2
votes
0answers
41 views

Data change event publishing by microservice vs separate application - best practice

Suppose there is a microservice that has an restful HTTP API for CRUD operations on a database - nothing fancy, but there is a journal table of all changes recorded for audit purposes. Suppose also ...
2
votes
0answers
53 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....
2
votes
3answers
2k views

Message Broker in Client-Server-Applications

I'm currently planning an architecture for a system that should consist of multiple microservices. We definitely want to make use of a message broker (probably RabbitMQ). A simplified diagram of my ...
2
votes
0answers
196 views

UI syncing in case of bulk operation api

In a CQRS system, the convention that we follow is we render the detail view of an aggregate(i.e getById) using the write model and views containing multiple aggregates(like a dashboard) using read ...
2
votes
0answers
270 views

How to design a sync api exposed to third party which involves a business transaction across aggregates?

Business Domain In the Sales domain, I have 3 entities - Lead, Contact and Opportunity. A lead is injected into the system from many sources and nurtured. If it is a prospect then it is converted ...
2
votes
0answers
409 views

Distributed transactions and recovery with stateless microservices

I suppose I have the following use case: I want a synchronous service if possible (in case of machine crash I want to finish it in background, by some other node) I want to save something in my ...
2
votes
0answers
451 views

Designing large nanoservice architecture with AWS Lambdas

I'm moving from a coupled architecture to a decoupled architecture using microservices with AWS Lambda. Here is my current architecture: Each API Gateway route is linked to a specific Lambda, each ...
2
votes
0answers
131 views

How do I take data offline for a specific tenant, if their data is spread across multiple databases and multiple microservices?

I'm working on an application with about 50 or so microservices that have separate multi-tenanted databases. The problem arose of taking a tenant's data offline meaning that any requests for a certain ...
1
vote
2answers
38 views

Compare diff between similar objects stored in two different databases and delete the missing records from the later

We have a legacy system (app 1) that has millions of records of an object Project. It has ProjectId and OrganizationId columns along with other properties. A recently added service (app 2) gets the ...
1
vote
0answers
71 views

How to do "initial sync" of data for new microservice that depends on data from another microservice?

Hypothetical scenario: Let's say I have a Customer service. It has 1 million customers in its database. I then create a new service that depends on a specific projection of the customer entity. I want ...
1
vote
1answer
79 views

What are the approches to to fetch common data btween microservices without replication?

One of the alternatives for managing common data between microservices is replicating the data needed by multiple services in their own databases but there are large data sets that we do not want to ...
1
vote
2answers
147 views

How to manage primary keys in CQRS

I'm building a backend following the CQRS pattern and I don't know how to manage properly the primary keys (surrogate keys) between the command and query databases. For example: I have a model with ...
1
vote
0answers
57 views

Topics best practices - AWS SNS and others

I'm designing a medium size project that will have few decoupled microservices. I want to avoid costly architecture mistakes at the very beginning. What I'm wondering (I googled and didn't found any ...
1
vote
0answers
88 views

In a microserices environment, how to track which version of which service is deployed where and when?

TLDR How do you keep track of which version of which microservice is deployed in which environment? In Details Say your company has dozens of Microservices and 5 different environments (Dev, QA, Prod, ...
1
vote
0answers
65 views

Strategy for a worker microservice to communicate with GraphQL API

I am trying to find the best way for a microservice to communicate with GraphQL Basic scenario: Client subscribed to GraphQL via Subscriptions (WebSockets) Client creates an Item using Mutation which ...
1
vote
0answers
65 views

How to handle the co-exist phase of Strangler pattern gracefully

We are consolidating a number of disparate monoliths, redesigning and implementing a greenfield suite of microservices and micro-frontends. The stack is all new, the design is all new - it couldn't ...
1
vote
0answers
171 views

RabbitMQ messages reliability for at-least-once delivery

I wanted to ask what are the possibilities of maintaining reliability when exchanging messages between microservices, when one of those message is rejected. As of today, we don't want to lose messages,...
1
vote
0answers
56 views

Multitenancy - Multischema DB and should we handle by individual microservice basis?

I am looking into the revamping my organization's application by moving from a monolithic into a microservice-architecture. My database is a multi-schema shared in one database. Each of these schemas ...
1
vote
0answers
322 views

Migration from monolithic Spring MVC, JSP, JQuery, Bootstrap frontend to micro-frontend

We are trying to migrate from a monolithic application to a micro-services one. On the backend we did a lot of work and now we start splitting it into REST micro-services with a well defined JSON API. ...
1
vote
2answers
437 views

Designing a scalable microservice: how to prevent one instance from performing an action if another instance allready did?

As I am moving a part of the monolith app logic to a microservice, I am standing before a problem with scalability. Currently, the main monolith runs on different instances, and has some scheduled ...
1
vote
0answers
25 views

How to Upgrade MQ with incremental approach with 50 micro services

I have around 50 microservices which communicate with each other using Apache MQ implementation. I want to know if I can avoid big bang approach when I need to upgrade the MQ version. Current option ...
1
vote
0answers
52 views

Microservice with "grab bag" set of inputs, how to manage for the long term?

My team is building a tenanted primary service, with shared microservices used by that primary to separate common business tasks. We're building a new microservice that is responsible for running a ...
1
vote
0answers
156 views

Event-based communication between microservices

I'm currently looking into NestJS to use as the framework for a new e-commerce project. The goal is to build multiple loosely-coupled services, which can communicate with each other using the pub/sub ...
1
vote
3answers
1k views

Background job in microservices

I have a basic java Dropwizard service within cluster of microservices. It manages user resources with restful api styles. Let's call it user-app Then there is a new operation / api endpoint that ...
1
vote
2answers
211 views

Chain of responsibility or simple dependency injection for Querying API

I am working on refactoring a project code that is wired up in a tangled way. It was started with decent dependency injection and over time with all custom requirements it looks it got tangled up. ...
1
vote
0answers
85 views

Can/should multiple application contexts share a common microservice in a single namespace?

My current employer has a single namespace into which all microservices for all projects are deployed. Projects A, B and C all use microservice x in this common namespace: Rather than each design ...
1
vote
0answers
71 views

How are changes populated to FrontEnd in Microservices Event First scenario?

I've been reading recently about Event First approach to microservices where Event Store is a Single Source of Truth for all the applications (https://dzone.com/articles/data-consistency-in-...
1
vote
0answers
351 views

ACL entity and microservices database relations

I would like to build a microservices architecture to handle the following scenario: I have a building. The building has some kinds of devices. And the devices can be used by the users. In the system, ...
1
vote
0answers
114 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? ...
1
vote
0answers
54 views

Dynamically start containers to isolate code compilation / running

I'm building a system where I need to measure certain algorithms, which are written by the end users. Obviously running external code is a huge security risk, therefore it needs to be isolated. The ...
1
vote
0answers
43 views

How should propagation of service abuse information work within a microservice architecture?

At the moment, I'm working on a product that's being broken down from a monolith to a bunch of microservices, and it seems to be going well enough. However, if a user is abusing the service somehow, ...