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.

Filter by
Sorted by
Tagged with
12 votes
1 answer
26k views

What is the best practice when it comes to naming microservices?

I come from a "monolithic" SOA API mindset where, lets say, there would only be one RESTful service for persistence (persistence-app). Now that I'm developing in a microservice environment, I believe ...
3 votes
3 answers
510 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
0 answers
39 views

How to use message brokers correctly in my micro service architecture [closed]

I have a taxi ordering service project. I would like to allocate to a separate microservice all the business logic that is responsible for the ordering process. Let's call this microservice Order ...
0 votes
1 answer
112 views

How to write custom implementation of a service/flow for a tenant in a multi-tenant microservice system?

I have a Java Spring boot microservice in production which supports multi-tenancy and the tenants are isolated at database level. This microservice exposes REST APIs for communication. During a ...
1 vote
1 answer
176 views

Distributing responsibilities in a micro service in an Object Oriented manner for a 3rd party integration?

I'm trying to figure out how to structure a 3rd party integration microservice, and how to name the classes accordingly. If you had a classic shopping cart application which processed payments for ...
2 votes
2 answers
113 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 ...
0 votes
1 answer
111 views

Does it make sense to create a new service to house multiple features that are related business-wise but tech-wise independent?

We are beginning to add third-party integrations that all have to do with a certain business concept. (If it helps to make things concrete, in our case it's "measurements," i.e. third-party ...
0 votes
1 answer
138 views

Azure Event Grid API layer beneath a HTTP API layer

I am part of a project/team that is building a new web app in Azure for the first time, having previously built and developed a traditional three tier ASP.NET web app over a number of years. We have ...
1 vote
2 answers
318 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? ...
3 votes
1 answer
122 views

Can multiple producers cause events with the same key to be enqueued out of order within a specific partition of a topic?

I'm aiming to create a simple event-driven system where each microservice operates with its own database. The idea is to share database changes across microservices through events. To ensure proper ...
1 vote
2 answers
794 views

Why do Streamlit applications often consume a FastAPI backend?

I am fond of writing Streamlit applications (when a front-end is needed) and fastAPI backends when I just need a REST API. I've seen many blog posts where these two are combined - with the Streamlit ...
0 votes
1 answer
134 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, ...
3 votes
1 answer
3k views

How do sites like LeetCode & HackerRank test your code for correctness?

Not sure if this question belongs here, but I've always wondered how exactly sites like Leetcode & HackerRank test your code. Say you code in Java for a question like, Find all the duplicates in ...
1 vote
1 answer
83 views

Access Token Or Alternative for Microservices For Resource Level Granular Checks

Hi I have following structure : Client App (layer 1) Business logic Services ( Layer 2) Business Logic layer consists of many microservices . Access token can be created and passed from APP layer to ...
0 votes
1 answer
87 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 ...
33 votes
2 answers
8k views

Should microservices be independent?

I have the following application: This application receives an API call (HTTP), does some internal work that usually includes reading or writing to a database that has 5 different tables, generates ...
1 vote
1 answer
365 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 ...
15 votes
2 answers
9k 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 ...
0 votes
1 answer
205 views

Microservices: Non-query calls from an API Gateway in the API Composition fashion

In a microservice architecture, it is common for an API Gateway to perform API Composition (providing CQRS is not used) for queries to multiple services to combine data to make it ready for a front ...
-1 votes
1 answer
141 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....
0 votes
0 answers
55 views

How to provide user id to proxied services in an API gateway pattern?

I'm making code examples of how to start a modern microservices web architecture from scratch, and I only recently learned about API gateway pattern. So far, the authentication methods I used for ...
1 vote
1 answer
90 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 ...
0 votes
0 answers
34 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 ...
53 votes
4 answers
32k views

Ways to share DTO across microservices?

I am designing a system 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. I'm trying to design every service ...
0 votes
2 answers
188 views

Clean Architecture with Microservices

I'm fairly new at system architecting and I'm looking for some advice. My company is revamping its order management system. Currently is a monolith system that scales very poorly and is difficult for ...
1 vote
2 answers
401 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. ...
2 votes
2 answers
187 views

Can chatty microservices be okay to use if there is a specific use case for them?

Introduction Hi everyone, in my company we are using microservice approach and of course are trying to do it as correct as possible. There is a new requirement coming up where I have laid out a ...
0 votes
1 answer
83 views

How to load consistent test data into multiple applications (which communicate by message streams)?

I have a system landscape consisting of multiple applications. Each application provides REST interfaces to communicate with the outside world. Each application has its own data storage (some kind of ...
0 votes
1 answer
233 views

Architecture solution for scalable crawling

I have the following requirements: a list of queries (rather long list ~ 100K - 1M items or even more) that I need to perform in a certain period of time and the execution time must be predictable. ...
3 votes
2 answers
246 views

Best approach to microservice shared databse architecture

I have two microservices, one Flask (python) and one Spring (java), they currently share a database. The Flask microservice handles processing json files (~40mb) for each user (could be 100's or 1000'...
3 votes
2 answers
411 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 ...
0 votes
3 answers
204 views

How to build REST uri that fetches children by parent ID

I am building 2 REST microservices: ParentService and ChildService. I need to build endpoint to fetch all Child resources related to specific Parent, so I have these URI's as options: GET /parent/{...
0 votes
1 answer
201 views

Is publishing to the same event store stream from multiple places an anti pattern in a distributed transaction?

Below is a little context to the problem I'm trying to solve. There are two separate microservices with separate frontends , APIs and databases. Customer Microservice - Manages customers Orders ...
0 votes
1 answer
99 views

Microservice & Clients interaction : Best way to persist previous API state information in successive API calls

Problem We have multiple microservices, like Home, Menu & Cart, exposed via Gateway. Each one has API exposed to the app. Now, each API has certain information that is needed by the successive API....
-2 votes
3 answers
101 views

Microservices messaging and coupling [duplicate]

So I am designing some microservices that communicate via messaging and event queues. However, if I update a message class, for example remove a field, this will break several participating ...
21 votes
5 answers
22k 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 ...
1 vote
2 answers
154 views

Designing a microservice architecture

I am looking to enhance my skills in back-end technologies and would need your help in setting up a scalable microservices architecture. Here's my project. I have N sensors that send me data (Pressure,...
3 votes
1 answer
390 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 ...
2 votes
3 answers
3k views

@OneToMany relationship in a microservice environment

I am coming from a typical monolithic background and I've been experimenting a lot with Spring Framework. I have also build some simple microservices communicating with each other etc. Now I want to ...
4 votes
6 answers
411 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 ...
0 votes
1 answer
106 views

Return type abstraction of a service layer that calls an API

I'm trying to find the best solution to abstract the return type of the service layer. I have a controller that calls a service to create a user. The service calls a REST API and receives an HTTP ...
0 votes
1 answer
64 views

Domain Boundary Definition in `proximity service` as a Case Study

While practicing System Design, I decided to create a hypothetical proximity service (like Google Maps) with a microservice architecture. Suppose we have 3 core categories of functionality: CRUD ...
1 vote
1 answer
244 views

Centralize input validation across multiple Microservices

My company, which specializes in logistics and transportation, delegated the majority of the backend microservices to our team. All of the microservices (which our team inherited from "past ...
9 votes
5 answers
4k views

Which comes first: CD/Trunk-based development or microservices?

My company* wants to move from using long-running feature branching (~up to a few weeks) to continuous integration with trunk-based development, and to break up our monolith into microservices. We'...
4 votes
1 answer
183 views

Using a single Postgres server process to manage multiple databases in a microservice application

One of the main guidelines I keep seeing for successfully building a microservice application is to use a separate database for each microservice. In diagrams these are usually depicted as physically ...
4 votes
2 answers
593 views

How far to go when decoupling Microservices by use of Integration Events (Messages)?

I am reading the architecture guide from the .net core project. They state: The integration events can be defined at the application level of each microservice, so they are decoupled from other ...
0 votes
1 answer
176 views

Cheap But Effective Solution for Logging in a private rest microservices backend api

I've created a backend following a microservices architecture and now I need to implement logging. my understanding After reading some articles about this topic, I've listed below some "pretty ...
0 votes
1 answer
221 views

Reading from SQS using AWS Lambda vs WebApp background worker

I'm writing a microservice (in .netcore) that will handle some requests using WebAPI, but also it needs to react to some external events. I see 2 possibilities how to solve it (on a very high level): ...
0 votes
2 answers
89 views

When should we separate common parts of multiple services into one separated service

We have some services (consider 10, some of them already exist and some are yet to come). All of these services have a common part where they keep track of what's being changed, and these so-called &...
0 votes
0 answers
70 views

Can the Enterprise Service Bus in SOA be replaced by multiple service bus implementations and still be SOA?

When and Service Oriented Architecture (SOA) is designed, and the ESB is changed to multiple independent service busses that talk to each other (pub/sub), does the architecture cease to be SOA? Is it ...

1
2 3 4 5
21