Home > Mobile >  How to scale a Spring Boot app to keep the same performance?
How to scale a Spring Boot app to keep the same performance?

Time:11-11

My question is theoritical (I am not asking the steps about scaling) and related to keep the same performance.

For example our web site (Spring Boot based) is visited 100 person / day and after a year is şs started 1.000.000 visit per day. In this situation, I have the following ideas basically, but need to know more and if these ideas are good or bad:

  1. Using Cloud services

  2. LOad balancer

  3. Using microservices and applying distributed system techniques.

  4. If read operations are much more than write or update, a NoSQL db can be used.

  5. If we use jwt token for authentication, dstributed system would not a problem for security auth side I think.

... etc.

Could you pls share your ideas and comment the idea above? Any help would be appreciated.

CodePudding user response:

There have been several POC( proof of concept ) and proved deployment strategies for better availability.

Keeping your points, I am summarizing and possibly giving a bit more clarity!

  1. Using Cloud services --> This is the platform you choose for e.g. One can choose on-premise service deployment or on cloud such as AWS,Azure GCP etc. Not related to scalability question at the moment.

  2. Load balancer --> Balance the load when you have multiple instances of your Microservice, so for e.g. You can create docker images of your microservice & deploy as a Pod on Kubernetes platform where you can have more than one Replicas (Replica is copy of your same service). Load balancer will balance the HTTP requests among multiple pods.

  3. Using microservices and applying distributed system techniques --> You can but make sure to adhere to best practices and proven Microservice deployment strategies. Read more about the more about them here https://www.urolime.com/blogs/microservices-deployment-strategies/

  4. If read operations are much more than write or update, a NoSQL db can be used. --> Definitely, infact you can decompose your microservice based on number of transactions or read/write operations & you can use NoSql DB like Couchbase or MongoDb

  5. If we use jwt token for authentication, dstributed system would not a problem for security auth side I think. --> Again such mechanisms are usually centralized and JWT token has some time validity!

So there might be several other options of scaling but most used is the one I mentioned in point 2.

I highly suggest you get a grip on basics, Here are few links which would be helpful!

https://microservices.io/patterns/microservices.html

https://medium.com/design-microservices-architecture-with-patterns/decomposition-of-microservices-architecture-c8e8cec453e

  • Related