Relative Content

Tag Archive for javaspring-bootredisapache-zookeepershedlock

Multiple instances of springboot running on same database – best way to handle concurrent db access

We have an environment where we run multiple spring boot web services all linked to a single database schema. All of them are registered to Eureka and a gateway is responsible of accepting client requests and routing to a certain instance based on the load balancing strategies. My question is that in case we have a job on these instances or in case for a certain reason we receive a request twice and each request was routed to a different instance, how can we prevent executing the same request twice?