Amazon EC2 Load Balancer
#1

So guys, I just launched an instance on Amazon EC2 and so far it's good enough. Only problem is it's vuln. for even small ddos attack. I heard they have this feature called load balancer. but I'm not sure what are the good rules to add in order to prevent these attacks. Does any of you know about this thing?
Reply
#2

Is this for a SA-MP server?

A load balancer requires that you run multiple EC2 instances with a SA-MP server on each instance - this wouldn't work because these would all need to be connected to each other somehow, otherwise players would be joining a random server. For example, if you tried to load balance against 4 x EC2 instances, a player that was sent to server #1 wouldn't see players on servers #2, #3 and #4.

Load balancing/clustering works for web servers because no important data is stored in memory on each instance - the only shared data is on a database which must be hosted externally - so users are spread to random instances which query and update a shared database. A game server doesn't have this feature because player data/state is stored in-memory in each game server instance.

Fortunately, running on EC2 means that you can take advantage of Amazon's massive network infrastructure - it's unlikely for example that an attacker will exhaust your network bandwidth, but constant SA-MP server requests might eat up your CPU and cause your server to become unresponsive. In that case, you can use some firewall rules (with iptables) to drop packets from dodgy attackers before they reach your server - this article is a good starting point.
Reply
#3

Quote:
Originally Posted by ev0lution
Посмотреть сообщение
Is this for a SA-MP server?

A load balancer requires that you run multiple EC2 instances with a SA-MP server on each instance - this wouldn't work because these would all need to be connected to each other somehow, otherwise players would be joining a random server. For example, if you tried to load balance against 4 x EC2 instances, a player that was sent to server #1 wouldn't see players on servers #2, #3 and #4.

Load balancing/clustering works for web servers because no important data is stored in memory on each instance - the only shared data is on a database which must be hosted externally - so users are spread to random instances which query and update a shared database. A game server doesn't have this feature because player data/state is stored in-memory in each game server instance.

Fortunately, running on EC2 means that you can take advantage of Amazon's massive network infrastructure - it's unlikely for example that an attacker will exhaust your network bandwidth, but constant SA-MP server requests might eat up your CPU and cause your server to become unresponsive. In that case, you can use some firewall rules (with iptables) to drop packets from dodgy attackers before they reach your server - this article is a good starting point.
Yeah, it is for a SA:MP server and I'm running on Windows Server 2012. So I guess i can't use iptables, right? Any other work around?
Reply
#4

Quote:
Originally Posted by lakshikagayal
Посмотреть сообщение
Yeah, it is for a SA:MP server and I'm running on Windows Server 2012. So I guess i can't use iptables, right? Any other work around?
I don't have a lot of experience with Windows Server but you could search around for best methods/tools to monitor network traffic and block bad traffic with Windows Firewall.

How do you know you're being attacked? Are your logs being spammed? Is your server not responsive?
Reply
#5

Quote:
Originally Posted by ev0lution
Посмотреть сообщение
I don't have a lot of experience with Windows Server but you could search around for best methods/tools to monitor network traffic and block bad traffic with Windows Firewall.

How do you know you're being attacked? Are your logs being spammed? Is your server not responsive?
It's just server is not responsive. Ping goes up like a skyrocket and while that, I can't even log into the server using RDP (connection timedout)
Reply
#6

Quote:
Originally Posted by lakshikagayal
Посмотреть сообщение
It's just server is not responsive. Ping goes up like a skyrocket and while that, I can't even log into the server using RDP (connection timedout)
That's really strange, Amazon should not be so vulnerable to DDoS attacks. Does everybody else have trouble connecting to the server?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)