Questions tagged [microservices]

An architectural approach to developing a single application as a suite of small individually deployable services.

The microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare mininum of centralized management of these services, which may be written in different programming languages and use different data storage technologies.

Microservices Definition by Lewis/Fowler

Properties:

  • The services are easy to replace.
  • Services are organized around capabilities, e.g. user interface front-end, recommendation, logistics, billing, etc.
  • Services can be implemented using different programming languages, databases, hardware and software environment, depending on what fits best.
  • Architectures are symmetrical rather than hierarchical (producer/consumer).

Philosophy:

  • The services are small - fine-grained to perform a single function.
  • The organization culture should embrace automation of deployment and
    testing. This eases the burden on management and operations.
  • The culture and design principles should embrace failure and faults, similar to anti-fragile systems.
  • The services are elastic, resilient, composable, minimal, and complete.

Books:

Besides there are thousands of books that speak about microservices focused on some language like Python or Java or some platforms like Azure or AWS easily to find.

Articles

The following is an great article series from the NGINX Blog.

Sites

9062 questions
65
votes
2 answers

Microservices with shared database? using multiple ORM's?

I'm learning about microservices and I'm gonna build a project with a microservices architecture. The thing is, one of my team mates want to use one database for all services, sharing all tables so "data doesn't get repeated", each service would be…
64
votes
3 answers

Using Amazon SQS with multiple consumers

I have a service-based application that uses Amazon SQS with multiple queues and multiple consumers. I am doing this so that I can implement an event-based architecture and decouple all the services, where the different services react to changes in…
62
votes
4 answers

Sharing code and schema between microservices

If you go for a microservices architecture in your organization, they can share configuration via zookeeper or its equivalent. However, how should the various services share a common db schema? common constants? and common utilities? One way would…
Jonathan Livni
  • 101,334
  • 104
  • 266
  • 359
62
votes
2 answers

Single Sign-On in Microservice Architecture

I'm trying to design a green-field project that will have several services (serving data) and web-applications (serving HTML). I've read about microservices and they look like good fit. The problem I still have is how to implement SSO. I want the…
Ido Ran
  • 10,584
  • 17
  • 80
  • 143
60
votes
3 answers

REST vs gRPC: when should I choose one over the other?

I see more and more software organizations using gRPC in their service-oriented architectures, but people are also still using REST. In what use cases does it make sense to use gRPC, and when does it make sense to use REST for inter-service…
nmurthy
  • 1,337
  • 1
  • 12
  • 24
60
votes
4 answers

Service discovery vs load balancing

I am trying to understand in which scenario I should pick a service registry over a load balancer. From my understanding both solutions are covering the same functionality. For instance if we consider consul.io as a feature list we have: Service…
59
votes
3 answers

Protocol Buffer vs Json - when to choose one over another

Can anyone explain when to use protocol buffer instead of JSON for micro-services architecture? And vice-versa? Both on synchronous and asynchronous communication.
Kaidul
  • 15,409
  • 15
  • 81
  • 150
55
votes
5 answers

What is Upstream and Downstream services in a microservices based architecture?

I have heard of the terms "Upstream Services" and "Downstream Services" in general terms but I came across some articles on microservices architecture where they have used these terms. I wasn't able to understand what an upstream and downstream…
Shubham Tiwari
  • 959
  • 1
  • 11
  • 32
55
votes
4 answers

Microservices Why Use RabbitMQ?

I haven't found an existing post asking this but apologize if I missed it. I'm trying to get my head round microservices and have come across articles where RabbitMQ is used. I'm confused why RabbitMQ is needed. Is the intention that the services…
Elias
  • 879
  • 1
  • 7
  • 13
54
votes
12 answers

type 'typeof globalThis' has no index signature

i get this error whenever i try to add a function to the global nodejs global namsepace in a TypeScript environment. Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature declaring the global…
Mhd
  • 817
  • 1
  • 8
  • 21
54
votes
5 answers

What is service discovery, and why do you need it?

As far as I can tell, "service discovery" means a way for a client to find out about a server (or cluster of servers) that it wants to connect to. I've built web applications that communicate with other back-end processes using protocols like HTTP…
gesgsklw
  • 741
  • 1
  • 7
  • 13
52
votes
3 answers

Spring Boot - Different systems( eureka , zuul, ribbon, nginx,) used for what?

I have been working with spring and now would like to learn spring boot and microservices. I understand what microservice is all about and how it works. While going through docs i came across many things used to develop microservices along with…
Vipin CP
  • 3,642
  • 3
  • 33
  • 55
50
votes
6 answers

Reactive Programming Advantages/Disadvantages

I keep studying and trying Reactive Style of coding using Reactor and RxJava. I do understand that reactive coding makes better utilization of CPU compared to single threaded execution. Is there any concrete comparison between reactive programming…
prranay
  • 1,789
  • 5
  • 23
  • 33
50
votes
6 answers

Communication between two microservices

I am creating a project with microservices architecture. And I created two microservices. One of them is for product entity, the other is for bill entity. They have their own endpoints and they are connected together with the gateway (i am using…
SerhatTR
  • 531
  • 1
  • 8
  • 13
49
votes
3 answers

Should I use forever/pm2 within a (Docker) container?

I am refactoring a couple of node.js services. All of them used to start with forever on virtual servers, if the process crashed they just relaunch. Now, moving to containerised and state-less application structures, I think the process should exit…
Patrick
  • 7,903
  • 11
  • 52
  • 87