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
27
votes
3 answers

Entity-level access restriction in the microservice architecture based on user or group membership

In the systems, there may be data that is restricted in nature. Sometimes access to specific entities should be easily restricted or granted based on user or group membership. What is the best way to implement this in the microservice…
Eugene Khyst
  • 9,236
  • 7
  • 38
  • 65
26
votes
7 answers

What is the difference between microservices and webservices?

The closest I got to finding the actual difference is this article. But I didn't understand what would make me choose one over the other and if microservices can also use a REST API and communicate via http. I mainly didn't understand what a…
Amir.F
  • 1,911
  • 7
  • 29
  • 52
26
votes
2 answers

How do you send data in a Request body using HttpURLConnection?

I am using HttpURLConnection to make a POST request to a local service deployed locally and created using JAVA Spark. I want to send some data in request body when I make the POST call using the HttpURLConnection but every time the request body in…
utkarsh31
  • 1,439
  • 2
  • 13
  • 20
26
votes
6 answers

Netflix Feign - Propagate Status and Exception through Microservices

I'm using Netflix Feign to call to one operation of a Microservice A to other other operation of a Microservice B which validates a code using Spring Boot. The operation of Microservice B throws an exception in case of the validation has been bad.…
Pau
  • 14,917
  • 14
  • 67
  • 94
25
votes
4 answers

Querying / Pagination Across Microservices

Our shop has recently started taking on an SOA approach to application development. We are seeing some great benefits with the separation of concerns, reusability, and other benefits of SOA/microservices. However, one big item we're stuck on is…
Mike
  • 2,334
  • 1
  • 23
  • 27
25
votes
4 answers

Microservice Versioning

What is the best practice to adapt for versioning in a Microservice Based Architecture, in terms of supporting multiple versioned deployment of the same service during runtime and how the consumers would be able to use different versions? 1) If we…
Divs
  • 1,578
  • 2
  • 24
  • 51
25
votes
1 answer

What are the disadvantages of Spring Boot for Java web applications?

[This needs to be voted to be reopened to answer.] Spring boot is tipped as being the default go to when making a new spring application as it makes set up easier and automatically wires in common dependencies. I am yet in industry to see…
UserF40
  • 3,533
  • 2
  • 23
  • 34
25
votes
7 answers

Customizing Zuul Exception

I have a scenario in Zuul where the service that the URL is routed too might be down . So the reponse body gets thrown with 500 HTTP Status and ZuulException in the JSON body response. { "timestamp": 1459973637928, "status": 500, "error":…
Grinish Nepal
  • 3,037
  • 3
  • 30
  • 49
25
votes
3 answers

Running multiple projects using docker which each runs with docker-compose

We are using microservices approach to build our product. We are using some projects which each uses docker-compose to run. The problem is that in development environment, if we want to change codes in multiple projects and test developed codes, we…
25
votes
5 answers

Microservices authentication

Context I have multiple services like : User (LDAP or active directory etc...) Billing Planning etc... Authentication I need to connect on my microservices Using OAuth2.0, for beginning, using the standard login / password (I use my own data, and…
mfrachet
  • 8,772
  • 17
  • 55
  • 110
25
votes
5 answers

How to deploy SpringBoot Maven application with Jenkins ?

I have a Spring Boot application which runs on embedded Tomcat servlet container mvn spring-boot:run . And I don’t want to deploy the project as separate war to standalone Tomcat. Whenever I push code to BitBucket/Github, a hook runs and triggers…
azizunsal
  • 2,074
  • 1
  • 25
  • 33
24
votes
3 answers

Equivalent of Ihostedservice in asp.net framework for background tasks

I have a restful micro service (web api) in .net 4.6.2 and I want to call a fire and forget function each time after certain endpoints are called to do some database cleanup work. I don' want to use Task.Run and I want to have a much reliable…
Pubu
  • 386
  • 1
  • 2
  • 9
24
votes
2 answers

Securing REST microservices with Spring Security

I'm looking for a best-practice and efficient solution to secure multiple microservices communicating via REST to a Web Client application. Current setup: These microservices are made in Java, with Spring Framework and run into Docker…
Alex
  • 4,599
  • 4
  • 22
  • 42
24
votes
5 answers

Microservices: datasource per instance or per microservice?

Building microservice architecture I faced the problem of data sharing between instances of the same microservice. I have microservice, that massively uses it's datasource - every request to service cause database request (usually insert). This…
ovnia
  • 2,412
  • 4
  • 33
  • 54
23
votes
3 answers

Which option is more suitable for microservice? GRPC or Message Brokers like RabbitMQ

I want develop a project in microservice structure. I have to use php/laravel and nodejs/nestjs What is the best connection method between my microservices. I read about RabbitMQ and NATS messaging and also GRPC Which option is more suitable for…
Mohammad Honarvar
  • 231
  • 1
  • 2
  • 6