View Feed
group-icon
Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12943 Members
Join this group to post and comment.
The_Small_k
The_Small_k • May 8, 2013

How to stop from making the server down by some client ?

Suppose i want to use the service provided by any enterprise application.
If i create a client application that will send the request to the server on every millisecond then the. and if i have 1000 of this type of application then the load on the server will increase even in the clustered environment.
Do anyone know how to fix this type of issue ?
Kaustubh Katdare
Kaustubh Katdare • May 8, 2013
A little more insight on the nature of your application will help understand the situation better. Pinging server every millisecond would definitely bring the server down and you may require a very powerful server.

More meaningful solution may be provided if you could write the details of your application.
The_Small_k
The_Small_k • May 8, 2013
Ok let us suppose that i have developed an enterprise application(shopping cart) on spring framework and i am providing services to our client using webservices.

One of my friend developed an android application(u can say a virus) that will use my services(suppose adding/deleting an item) repeatedly on a very short interval(say 1ms).
As we can see the server is busy in giving the response to that android client so it will increase the load on the server and hence in that case if some other one try to open my website it will load slowly or may not be loaded.

one idea is i can host my application in the clustered environment where load can be balanced by LBS but it is not the solution. what if 1000 of that type of client application is developed.
Anand Tamariya
Anand Tamariya • May 8, 2013
You can configure firewall to limit the number of requests from a particular IP.
Abhijit Dey
Abhijit Dey • May 8, 2013
What you are talking about is similar to a DDoS attack. Such attacks cannot be prevented, but they can be reduced. Try using Honeypots or Intrusion Detection Systems (IDS) on your system. With these softwares you could ban such IPs where so many requests are being sent to your server. But getting around these softwares need time to understand, but if you develop one yourself you could configure the handling of requests.

And as said by Anand Tamariya you could use a firewall where not much settings are required.
Gandalf
Gandalf • May 9, 2013
If you are serious about your enterprise application get the VPS server at least. They will handle DDoS attacks , Brute Force attacks and have a secure entry exit for the same with the best of firewall but yes a bug in your application can always be exploited. Be Careful !!
siraj.mussafirr
siraj.mussafirr • May 9, 2013
The_Small_k
Suppose i want to use the service provided by any enterprise application.
If i create a client application that will send the request to the server on every millisecond then the. and if i have 1000 of this type of application then the load on the server will increase even in the clustered environment.
Do anyone know how to fix this type of issue ?
If you are making a web application what you are doing currently is polling the server that can generate a number of useless request to the server. Its like you are asking the postman "Do i have a mail, do i have a mail? "hudreds of times per day.
I'd suggest you to use "long polling" that keeps a path open to the server and reduces the unwanted requests.
Another option that more appropriate is to have "Socket" Connections. on Client side you can use a "WebSocket", available in HTML5 and on server side you can use the Sockets provided by the language you choose (PHP, Python, Java, whatever). Its like how you recieve theSMS. when the server get some new content it pushes it to the clients who have registered or who are currently active. Its left to the Server to serve the content it wishes to be served. So your postman will bring you the mail when a new one arrives. 😀
Note: Sockets are not limited to web applications but its available in every kind of programming languages.

Share this content on your social channels -