1

Think your server is being D-DOS'd?

Keepsedge 11/18/13 8:48 am
146
Think again.

While it is entirely possible that your server has come under the attack of some malicious group with enough resources to cripple even the thickest defenses, odds are probably not.

I should point out now, this thread is not for folks that use pre-built hosting plans, This thread is specifically aimed at Server teams that run their own boxes, either VM, or dedicated.

- I apologize now if this is in the wrong forum, "Server Help" seemed prudent -

Introduction:
My name is Joseph Sullivan, I am an NMS Engineer. I work with IBM Tivoli products, and possibly one of the most well assembled deployment teams ever. (I am however a bit biased ).

Lets get To It:
If your reading this, you probibly meet some of the following conditions.
- You run multiple Minecraft Server instances on the same machine
- At least one of your server's uses the popular "Dynmap plugin"
- You use some sort of proxy (like bungee)
- Your servers are plagues with odd, unexplained outages, mass connection drops
- Your servers utilize a MySQL Database (or similar RDBMS if you hacked in a PostgreSQL Driver)

The last symptom being the clincher there. - And here is what (I Think) is really happening. Plugins like Essentials, Dynmap, Lockette, LWC, (a million others) that keep state of information do so by logging data to a database, or to a flat file, (or in some cases an SQLite Database, which is a flat file, just better organised ). No one of these plugins is deleterious, Even most of them together wont hurt a decent machine / VM). Its when you start adding more server instances.

Lower, under the Operating System, you have the hardware, one piece of hardware in particular, the Hard Drive. Hard Drives are only capable of writing data but so fast. (There's roughly 13 milliseconds of latency). This latency can, does and will add up, leaving the available CPU's waiting for the disk to return from it's operation. I believe this is a huge contributing factor to poorly performing multi-instance servers.

There is a solution. Simply put, you need more disks. Not bigger disks, just more of them. - Optimally a Stripped RAID Array would be rockin' - but we'll just say more disks, I'll leave the implementation up to you.

Before you go breaking your machine - try using:
iostat -xnm 2
to inspect the disk reads / writes per second.

Assuming that you keep your server instances in a single framework directory like /opt/minecraft/instances. You would want to do something like this:


// make a new framework directory
# mkdir /opt/<your_company>
# mkdir /opt/<your_company>/instances
# mkdir /opt/<your_company>/instances/smp
# mkdir /opt/<your_company>/instances/skyblock
# mount -t ext4 /dev/sdb0 /opt/<your_company>/instances/smp
# mount -t ext4 /dev/sdc0 /opt/<your_company>/instances/skyblock

- rinse and repeat for each instance you have. (Note that i used the ext4 filesystem, be sure you use whatever filesystem the drives are formatted in (ext3, jfs, whatever)

- DO NOT mount different partitions of the same drive (/dev/sdb0 /dev/sdb1) as they share the same Disk I/O (This would be okay for underused servers, but could still bottleneck if they get very popular - i recommend against it)

- be sure you add your custom mounts to /etc/fstab so the are mounted automatically if the machine ever reboots.

- lastly, you need to copy the data from your existing framework into your new framework. Because of the way linux mounts devices, it appends the device to the file system at the mount point. so /opt/<your_company>/instances/smp looks like its on the same drive, it's not.

If your not overly familiar with *NIX systems I do not recommend you do this on your own.

Anyway, there's a bit of information, and some considerations. This post made in response to 30 messages I received on Skype telling me their servers were all being DDOS'd in a window of about 5 hours.) - I highly doubt it.

Good luck owners,
-- JSullivan

Cite: http://blog.scoutapp.com/articles/2011/ ... be-worried
Posted by
Keepsedge
Level 3 : Apprentice Network
4

  Have something to say?

JoinSign in

Welcome