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.
1,042 questions
0
votes
2
answers
204
views
Keeping the impact of changes low when moving shared domain objects into a library
I’m refactoring a microservice project where multiple services share the same domain objects. Over time, these objects have diverged across services, causing inconsistencies.
To solve this, I plan to ...
4
votes
3
answers
228
views
Achieving Multitenancy with an External Identity Provider
We are designing a backend system for a large platform where users can interact with multiple products on behalf of different companies.
We plan to use Keycloak as an external identity provider. The ...
2
votes
3
answers
426
views
Handling authorization and authentication with an API gateway
Recently, I’ve found myself designing a microservices system, and I’m currently facing some challenges with authentication and authorization.
Context
All my microservices will be placed behind an API ...
0
votes
1
answer
153
views
Microservice Architecture Design
I want to create one service that reads data from two databases and passes it to the customer devices. Is this an overall bad design decision? I think that since it is only read-only, it should be ...
0
votes
2
answers
176
views
Scaling/microservices approach to reading files from same directory
My company receives files via SFTP. We currently have a service running on a timer that:
polls the inbound directory
moves files to an 'In Progress' directory
processes files (queueing messages for ...
0
votes
1
answer
116
views
Designing a Scalable Caching Layer for User and Tenant Metadata in a Messaging System
I'm developing a microservice-based application that processes a high volume of messages. Each message must be handled according to the user’s personal settings and some tenant-specific (customer) ...
3
votes
2
answers
327
views
Microservices blindly trusting anything due to network segmentation?
So I just fell in a project where microservices are inside private subnets and therefore aren't reacheable through the internet.
There is a balancer that can reach this microservices and this balancer ...
1
vote
4
answers
251
views
Can we consider each microservice as a “small monolith” application? [closed]
I'm just getting started with software architectural patterns.
I first analyzed the difference between monolithic architecture and microservice architecture and I had a doubt.
Below I report the ...
5
votes
4
answers
730
views
Is this too much for a modular monolith system? [closed]
A little background before I ask my questions. I've designed a system as an architect based on the requirements given to me by the client. The client has a team or two to three developers which are ...
3
votes
2
answers
512
views
Why do I need an authorisation server if my micro services can validate JWTs directly?
I'm working on a Spring-based micro service project and considering different approaches for handling authentication and authorization. Instead of setting up a dedicated authorization server, I'm ...
3
votes
3
answers
496
views
Is it a good idea to wrap node.js package functions in a micro-service architecture?
Our development team works with a micro-service node.js architecture. This means we work with a very large amount of repositories that currently each take care of their own dependencies.
To avoid ...
2
votes
4
answers
890
views
Microservices shared end-to-end testing: Which version(s) of other microservices to use?
Introduction
I am reading Building Microservices (second edition) by Sam Newman.
In chapter 9 the author highlights 2 problems when desiging end-to-end testing for microservices:
Which version of the ...
-1
votes
3
answers
287
views
How to deal with TCP-sockets being dropped instead of closed server-side?
Scenario: An application maintains a pool of connections to another service. The other service drops (not closes) all connections but still accepts new connections.
What are the best way of dealing ...
0
votes
1
answer
112
views
Scoped E2e testing on a microservice
As many, we use microservices in my company and there's some debate in my group whether a microservice has e2e tests on it's own.
I know e2e tests by definition are user flow tests.
Lets take for ...
0
votes
2
answers
320
views
DDD: How to update a domain model with a lot of fields
Let's say there is a domain model:
@Table(name = "room")
@Getter
@FieldNameConstants
@AllArgsConstructor(onConstructor = @__({@PersistenceCreator}))
public class HotelRoom extends ...
0
votes
3
answers
161
views
Bypass the need for a service layer with SQL Server views (for Read Only)
A service interface allows a service layer to support backwards compatibility. As long as the different versions of the API are still supported, then changes can be added to the newer versions of the ...
0
votes
3
answers
309
views
Design and communication between microservies
To learn about things like microservices, messaging brokers and all other new and fancy things, I decided to create microservices that will let me monitor my base within Minecraft (done via ...
2
votes
3
answers
700
views
Is there a way to avoid a lot of calls to other microservices from one single service request?
I'm developing a Microservices Web Chat Application using Spring boot and Websockets.
Right now my concern is the following: it seems like each one of my microservices need to make a lot of calls to ...
-2
votes
1
answer
242
views
Transaction Management Across Microservices with Rollback Mechanism using Kafka
I am currently developing a microservices architecture consisting of two services, and I'm facing a challenge related to transaction management and error handling.
Microservice A: This service is ...
-3
votes
2
answers
188
views
How to properly choose between two equivalent implementations, and how to prove you picked the correct one? [closed]
Thinking about non functional requirements (the -ities) and other concerns, which approach would you choose and why? consider the two snippets
Direct Supabase Connection
import { useState, useEffect } ...
2
votes
5
answers
500
views
How to follow Outside-In TDD with Micro-services and Micro-frontends?
I was exploring TDD, specifically the Outside-In TDD pattern, where we need to write the acceptance (integration) test and then jump on to granular unit tests to implement the feature and make the ...
2
votes
2
answers
127
views
How to split database entities or access responsibilities of services to these entities
I have two services, auth-sync and twitter-indexer.
We use Privy for auth (incl. SSO with 3rd parties). We sync our userbase from Privy to our own DB for certain analytics purposes. And the auth-sync ...
3
votes
2
answers
435
views
Populating Cache in microservices
These days I was asked by our technological leader to populate a cache.
The exact nature of the request impacts a back-end (BE) system that operates on a database through a client library.
The BE is a ...
3
votes
3
answers
480
views
How to tackle synchronizing large amounts of data across services in an efficient way?
I am working at a retailer with a deep catalog of products and we are taking stock of our architecture.
Currently, we use microservices, but all product information goes to a service that is getting ...
1
vote
2
answers
113
views
Subscribing to a range of topics per instance of a service [closed]
If I have a system where my distributed service is sending live scores of 1000 s of football games from some hypothetical event to millions of clients. The service subscribes to the games from a ...
-2
votes
1
answer
203
views
Spring/Java multiple shared modules for different databases
I'm implementing a software based on the micro-service architecture using Spring/Java. Each micro-service connects to either a PostgreSQL or a MongoDB database. Is it standard practice to have a ...
11
votes
7
answers
5k
views
How to maintain dependencies shared among microservices?
There is a dependency jar containing tons of service classes mostly used to retrieve data from database, and this jar is used among several different micro services in one cluster.
There is a big ...
2
votes
1
answer
330
views
Problem with data consistency in Microservice architecture(2pc transaction) when external dependency envolved
I have microservice architecture. I implement a distributed transaction flow (2-phase commit), kafka, and 1 coordinator service. So, my problem is in each step of preparation I am calling an outside ...
3
votes
3
answers
451
views
Encapsulating a central soap service in a microservice?
I am currently developing an application (rest-backend and SPA) that requires information from people (personal data, department, superior... ). Our company has a central directory for this purpose. ...
6
votes
4
answers
2k
views
Protecting against malicious duplicate IDs in a distributed environment
Let's say we have multiple (somewhat autonomous) (micro-)services, and when entities are created, the ID (UUIDs or whatever) can be set externally. How can we ensure that an ID remains unique across ...
2
votes
4
answers
505
views
How to avoid circular dependency in my scenario?
For example, I have a Business Intelligence (BI) microservice, it reads data from other microservices, and displays the data as a bar chart or some other styles.
My problem is, the BI microservice ...
0
votes
1
answer
294
views
How to design permission-based authorization for individual resources for individual users?
I need to design a system that handles multiple types of resources, each having their own business logic and different types of actions available for those resources. The requirements are a natural ...
0
votes
3
answers
187
views
Events data ownership in microservices
Imagin I have two microservices that need to send email to a customer about some important account realted things that happened.
For example, Billing service would like to send an email when a card ...
0
votes
2
answers
342
views
How to implement event payload isolation in an event driven architecture?
I have an event, let's say order.placed The payload consists of some general information about the order and 3 confidential fields. For example part of the message should only be visible to consumer A,...
0
votes
0
answers
121
views
Is turning objects that perform infite loops into a services a good practice?
I was assigned a task to change the communication mechanism between two parties, from Azure Event Hub to Azure Queue + Blob Storage.
On the way, I thought redesigning a bit the components to make it ...
1
vote
1
answer
179
views
App that can be deployed both as monolith and microservices?
We have a monolith C++ application and I consider doing some major refactorings. Since we're not completely ready to go full "microservices only" (maybe in about two years time), I want to ...
1
vote
1
answer
176
views
Monolithic Database to Microservices, but with Radical Data Model Changes
We are finishing up a long (over 1 year) project to retire our monolith. We have been moving pieces of functionality into microservices guided by domain driven design.
So far we have been leaving the ...
-2
votes
2
answers
257
views
Microservices - how to implement search combined with security cross cutting concern?
I am trying to design a system and bounded contexts.
I have 3 microservices: Security, ProductsCatalog and Customers.
Each microservice own its database.
Security is a cross cutting concern used in ...
1
vote
0
answers
106
views
Best way to orchestrate/choreogaph steps in a pipeline where each step is executed by a separate microservice and may need to scale independently?
Update: Forget the 'best' way, any way to start with is good enough. I am new to this and figuring it out all by myself is taking too long. I don't even know where to start.
I am new to this and ...
2
votes
4
answers
549
views
Many-to-many modeling for microservices
I have two microservices, say "students" and "courses", they represent separate entities that are managed separately by different teams.
A given student can be enrolled in multiple ...
3
votes
2
answers
474
views
Microservices: separate db instance vs. separate db server
In a scenario with multiple teams, each overseeing a few microservices that collectively create a larger system, and where these services frequently use MongoDB databases, is it advisable for each ...
2
votes
2
answers
1k
views
How to effectively scale one microservice to multiple instances
Let’s say I have a booking microservice (single instance) with its own DB.
If I want to horizontally scale the service with multiple instances(exact same copy of the business logic code) running on ...
1
vote
1
answer
218
views
How does a Bounded Context from DDD help scaling microservices?
New to the microservices architecture - but what I've picked up so far doing some research while designing a microservices architecture for a home rental system is these:
Individual microservice ...
4
votes
3
answers
638
views
When would you consider sharing a database to be fine? What are your rules?
When would you consider sharing a database to be fine? What are your rules?
Our team in-charge of in-store credits.
We:
Calculate how much credit the customer earned
Keep track of how much credit the ...
2
votes
2
answers
215
views
Child Entity or Aggregate Root?
I have to design a part of a system in responsible for creating tickets for attractions and then sell them. Basically there are
three different parts:
Product: to create the tickets for sale for each ...
2
votes
2
answers
611
views
Is service discovery an anti-pattern?
We deploy microservices in Kubernetes environment.
For providing a solution to a business use-case using microservices,
Is the idea of service registration and service discovery not an anti pattern? ...
1
vote
1
answer
199
views
E2E tests and fan in build pipeline
In chapter 9 (Testing) of the book Building microservices (2nd edition)
Author suggests using a Fan-in approach to have a single shared E2E tests for all microservices. This way tests of unchanged ...
-1
votes
1
answer
1k
views
Microservices architecture for spring boot application
I have a Spring Boot application which is containerized. The application has become huge with lots of complications and its difficult to maintain it. So I am thinking of breaking it into microservices....
1
vote
0
answers
109
views
Architecture Design using Queue and JWT Token for session management
I am planning to design a microservice system architecture for a ticketing platform. It will be similar to "TicketMaster". Here is the flow of my architecture:
client web browser
API ...
1
vote
1
answer
137
views
Exposing DB table to other Microservice via a Library
Consider I have 4 Services .
Account
Order
Items
Customer
Now a External Partner Service calls all these services , by passing an External customer id ( EXT_CUST_ID) in the request.
Our platform has ...