Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

spring boot application in cluster

I am developing a spring boot application.

Since spring boot created a .jar file for an application. I want to cluster this particular application on different server. Lets say I build a jar file and ran a project then it should run in cluster mode from number of defined servers and should be able to serve end user needs.

My jar will reside on only one server but it will be clustered across number of servers. When end user calls a web service from my spring boot app he never know from where it is getting called.

The reason behind clustering is suppose any of the server goes down in future, end user will still be able to access web services from another server. But I don't know how to make it clustered.

Can any one please give me insight on this ?

like image 925
mahendra kawde Avatar asked Jan 07 '23 10:01

mahendra kawde


1 Answers

If you want to have it clustered, you just run your Spring Boot application on multiple servers (of course, the JAR must be present on those servers, otherwise you can't run it). You would then place a loadbalancer in front of the application servers to distribute the load.

like image 165
dunni Avatar answered Jan 10 '23 00:01

dunni