Load Shedding with APIs

Question: What is the concept of Load-Shedding ?

Question: What are the factors, based upon which we can be performing the Load-Shedding ?

Question: Share with an example, what would happen with all the dropped requests, while we are doing the Load-Shedding ?

Question: Demonstrate the step by step example to implement the Load-Shedding with Spring Boot based Microservice ?

Step #1.) First, we create the Spring boot based application :-

Step #2.) Secondly, the controller looks like this :-

Step #3.) Next, we would write the code for our FILTER as below :-

Step #4.) Now that we run our application :-

  • We can observe that, for first three requests, the request has been well accepted and response is well served, whereas for the 4th shell, the response “Service Unavailable” has been returned.

That’s all in this blog. If you liked reading this, do clap on the same. We would meet you in next topic on another blog.



Software Engineer for Big Data distributed systems

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store