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.

136 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
1 answer
313 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 ...
  • 149
4 votes
0 answers
856 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 ...
  • 141
4 votes
0 answers
202 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
0 answers
139 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 ...
  • 1,677
3 votes
3 answers
241 views

Best practice to architect a system in which local users may override global definitions

Our travel industry client, operating across three continents and several countries, wants to standardize the process of choosing travel packages, air routes, hotels, and hundreds of other travel ...
3 votes
2 answers
248 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
0 answers
59 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 ...
  • 1,886
3 votes
1 answer
347 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 ...
  • 131
3 votes
0 answers
383 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 ...
  • 451
3 votes
0 answers
947 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 ...
  • 209
3 votes
0 answers
407 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 ...
3 votes
0 answers
57 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
0 answers
293 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 ...
  • 297
3 votes
0 answers
814 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
1 answer
114 views

Should every service have its staging environment?

I'm trying to break down my dockerized monolith into a few services that can be deployed independently. Right now, I have a development environment, a staging environment and a production environment. ...
  • 197
2 votes
0 answers
76 views

How to define the data model in an event-based infrastructure

After my team went all-out on the microservice paradigm with an emphasis on message passing, I'm having trouble defining and keeping track of all the events in the system. I've read some guides on the ...
  • 29
2 votes
1 answer
138 views

Foreign key check without data duplication in separate microservices

If for example we have a user, project and a task service where a task is assigned to a single user and user can be part of multiple projects - how can one enforce a rule so that one cannot assign a ...
2 votes
0 answers
149 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 ...
  • 129
2 votes
2 answers
401 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 ...
  • 461
2 votes
0 answers
236 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, ...
  • 281
2 votes
0 answers
115 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
0 answers
81 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, ...
  • 129
2 votes
0 answers
91 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-...
  • 302
2 votes
0 answers
58 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....
  • 336
2 votes
0 answers
207 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
0 answers
372 views

How to maintain table relationship across services in with a micro-service architecture

I have a scraper service that looks for media online. For every source type, there are two tables. A common source table and a source_type_media table that are related by source.id to ...
  • 111
2 votes
0 answers
427 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
0 answers
515 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 ...
  • 169
2 votes
0 answers
138 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 ...
  • 642
1 vote
0 answers
55 views

Cache publishing updates, or clients polling the cache?

Context: I am working on an application which loads a cache on startup - periodically refreshed. However it turns out that this cache is something which is very general and can be used by other ...
1 vote
0 answers
48 views

Micro-Services: How to avoid repeated polling of the same event from Kafka

I have an Micro-services where we get the event messages from a Kafka messaging system. The event message contains the orders information, quantity, the mode of package and delivery location. At a ...
  • 111
1 vote
0 answers
78 views

How to handle Authorized & Non-Authorized Routes in Microservices with Tokens

Context Suppose there is a e-commerce microservice architecture with the format: In summary, a client will contact the Auth Service / Identity Service to receive a token. It passes the token to the ...
1 vote
0 answers
51 views

Design a push events service at code level

In a large monorepo containing multiple micro-services, I need to build a service to push various events to several of them. The event interface differs from service to service(one will have filed_5 ...
  • 101
1 vote
1 answer
78 views

Prevent missing updates using a message broker after creating a task

I'm trying to design a data updates mechanism in my micro-services architecture. For the sake of simplicity, let's assume we have two micro-services A and B, B exposes an API for creating some tasks, ...
  • 109
1 vote
3 answers
199 views

How to split out shared authorization logic across spring microservices

Currently working on a project where we have multiple services that all need to consume the same authorization service when their endpoints are hit. Right now we have the authorization boilerplate ...
  • 151
1 vote
0 answers
186 views

Microservice code reuse strategy for static classes

Hope this is the right place to post an opinion-based question like this. I'm in the process of converting an aging API monolith to a set of .NET 5/C#-based microservices and working on the code reuse ...
1 vote
2 answers
86 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 ...
  • 19
1 vote
0 answers
97 views

Design : How to divide the responsibility in micro services

I have two micro services built using spring boot, One micro service is: "payment" Which handles actions related to payments. Like creating a payment link. Getting the latest status of ...
  • 101
1 vote
2 answers
314 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
0 answers
468 views

gRPC client - to - client communication between other Lan network

I have a question about gRPC communication. I know gRPC has 4 models communication: unay, server-streaming, client-streaming and bi-direction. And the terms "client" and "server" ...
1 vote
0 answers
135 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
0 answers
96 views

Redundancy approach for Pub-Sub application with events replication

I'm new to the microservices field. I'm looking for the right approaches regarding how to deal with the challenge of redundancy of a pus-sub application. Assume my application has has the below ...
  • 101
1 vote
0 answers
95 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 ...
  • 111
1 vote
0 answers
98 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
0 answers
228 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
1 answer
273 views

Passing an OAuth Token between services with Zero Trust and audience checks

Let's say, we're using an OAuth / OpenID Connect (OIDC) flow (in a Zero-Trust situation) to secure two APIs: ServiceA and ServiceB. To implement some of the functionality of ServiceA, it depends on ...
  • 316
1 vote
0 answers
77 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
0 answers
565 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. ...
  • 19
1 vote
0 answers
36 views

Resource creation (users, secrets, etc) from monoliths to microservices

I'm part of an initiative where we are moving monolithic-ish applications, each running on their separate VMs and using a common database cluster, to a container architecture with the goal of ...
  • 101
1 vote
0 answers
34 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 ...