News for hackers. Stuff that matters.
Re:“We have been experiencing a catastrophic DDoS attack” by encoderer on Saturday September 03, 2016 @09:54PM (#12422259)
I've done some googling before asking here: Can anybody explain why Linode is so often targeted like this? We moved Cronitor off Linode in spring 2015. During the christmas holiday when they suffered a 2 week DDOS I thought of the family time I'd be missing that year as we did a crash migration to AWS had we not migrated when we did. I have to imagine this has been horrible for their business.

I would use Linode if I needed to lease computational power, because it is still a great value vs AWS, but I could not run a high availability service there. It would feel like professional malpractice at this point.

Re:“We have been experiencing a catastrophic DDoS attack” by funkyy on Saturday September 03, 2016 @10:48PM (#12422414)
I am also surprised as this is not the first time I am reading about it on HN. Linode seems to be highly vulnerable to certain attacks as we could see in the past. I hope they will fix it and provide a permanent solution as I was hoping to use them as a part of my network, but I see more and more signals they can't handle serious traffic. Hopefully, they will redesign their infrastructure to handle it.

I am with all of you guys that are affected by this. I am looking forward to them to resolving this soon.

Re:“We have been experiencing a catastrophic DDoS attack” by morecoffee on Saturday September 03, 2016 @10:52PM (#12422423)
Isn't the problem money? They could certainly fix it but would have to raise the prices on each VPS?
Re:“We have been experiencing a catastrophic DDoS attack” by reefoctopus on Saturday September 03, 2016 @11:12PM (#12422482)
I'd be ok with paying twice what I'm currently paying if they could solve this problem. We're with Linode because it would cost us about 10x as much to run on AWS, and we can't justify that.
Re:“We have been experiencing a catastrophic DDoS attack” by hakanensari on Saturday September 03, 2016 @11:36PM (#12422552)
They're price-matching DigitalOcean, so raising prices is probably out of the question.
Re:“We have been experiencing a catastrophic DDoS attack” by ksec on Sunday September 04, 2016 @12:33AM (#12422714)
Linode is now half the price of DO per RAM
Re:“We have been experiencing a catastrophic DDoS attack” by Sir_Cmpwn on Sunday September 04, 2016 @09:51AM (#12424305)
Disclaimer: Linode employee, not in networking

My understanding is that Atlanta in particular has some poor upstreams and is making our job pretty difficult there. Notice that it's almost always Atlanta that's getting hit. I would suggest just using other datacenters or making sure your high availability model includes several DCs (which I would suggest at any hosting provider, really).

Re:“We have been experiencing a catastrophic DDoS attack” by spydum on Sunday September 04, 2016 @08:52AM (#12424069)
As others have said, maybe it's to affect a customer. However, hosting industry had a lot of roots in the adult content industry, and those guys didn't have many ethical guidelines. It was not uncommon for hosting companies to DDoS each other to drive a competitor out of business. Not saying that is the case here, but perhaps?
Re:“We have been experiencing a catastrophic DDoS attack” by nxzero on Saturday September 03, 2016 @10:03PM (#12422286)
Ask HN: Who is behind the Linode DDOS attacks?

https://news.ycombinator.com/item?id=10797795

Re:“We have been experiencing a catastrophic DDoS attack” by ryanlol on Saturday September 03, 2016 @10:05PM (#12422289)
Re:“We have been experiencing a catastrophic DDoS attack” by mappu on Saturday September 03, 2016 @10:20PM (#12422330)
We stuck with Linode after that, but the important parts now failover to Vultr.
Re:“We have been experiencing a catastrophic DDoS attack” by reefoctopus on Saturday September 03, 2016 @10:32PM (#12422374)
How did you set it up to failover? Our MySQL database is very large, and I'm not sure of the best way to ensure it is up to date on another host.
Re:“We have been experiencing a catastrophic DDoS attack” by anthony_franco on Saturday September 03, 2016 @10:54PM (#12422431)
For our setup we just have master-master replication across two different hosting providers.
Re:“We have been experiencing a catastrophic DDoS attack” by leesalminen on Sunday September 04, 2016 @12:07AM (#12422629)
I've been wondering about this lately. Is it really feasible for a small (one man?) team to keep master-master MySQL replication over WAN running smoothly?
Re:“We have been experiencing a catastrophic DDoS attack” by toast0 on Sunday September 04, 2016 @11:32AM (#12424842)
If you want things to work smoothly; dual-master, single-active is the way to go.

If you use mysql's read_only flag and application users don't have SUPER permissions, you can easily prevent writes to the wrong server; set read_only = 1 in my.cnf and manually set it to 0 on exactly one of the masters. Use the read_only flag to drive automation for which server to send writes to.

Manual failover is set old server read_only, kill existing connections (read_only flag is cached), wait for replication to catch up, set new server read_only = 0. You can make a script to do this with one button, but I wouldn't recommend making it autonomous: flapping between servers is disruptive and could lead to data inconsistency if you switch when replication is behind; data inconsistency is usually way worse than write downtime until someone logs in to flip the switch.

Try to have half your slaves off each master, so if a master is down, you still have 50% capacity. (I've seen some patches from google a while ago to keep binary logs in sync between masters, and make switching masters easy: If that's available, you may be able to have slaves just follow the current active master)

If you have budget for it, an extra slave off each master can be helpful: You can cron them to shutdown MySQL, tar up the directory, and restart. If you untar that on a new slave, it'll continue replicating from that point in time. If you rotate out the backups, you also have some ability to restore data from the past, if there is a bad update.

Re:“We have been experiencing a catastrophic DDoS attack” by donut2d on Sunday September 04, 2016 @12:27AM (#12422694)
I'm a one man operation keeping a master-slave setup with a manual failover and it's been pretty smooth sailing once I got it setup. Don't know how much more complex master-master would be.
Re:“We have been experiencing a catastrophic DDoS attack” by tempestn on Sunday September 04, 2016 @06:10AM (#12423629)
Same here, and as long as you understand how mysql replication works it's not too much effort to deal with. Performing the initial sync without downtime is a bit tricky, but can be done with a well-designed database and some thought. Basically you need to at least temporarily make the bulk of your data read-only, so that you can do most of the data transfer while things are running, and then only briefly lock tables on the source server for long enough to copy the stuff that has changed since the dump, and grab the binlog position. Then you copy that stuff over to the slave as well, update the slave to the correct position, and then start the slave.

That's master/slave, but to get master/master, all you need to do is start a slave on the original master and point it at the current master position on the original slave (which should be static since it isn't yet accepting any queries directly). These posts may be helpful:

https://www.digitalocean.com/community/tutorials/how-to-set-... http://plusbryan.com/mysql-replication-without-downtime

Once it's running, as long as you're not running autoincrement queries or other things that can conflict on both servers at the same time, without taking appropriate precautions, it should chug away without any intervention.

If something does go wrong, you can often figure it out by looking at the slave status, fixing the inconsistency manually, skipping the bad query, and then starting the slave. If not though, you can always just re-synchronize from scratch. Or even better, run your databases off of an LVM volume, then take regular snapshots. (IE snapshot, make a tarball of the snapshot of the mysql directory, then remove the snapshot.) That will give you a consistent backup, even with the server running. On an SSD, the temporary added latency probably won't be noticed, especially if done off-peak. Then if anything goes wrong, you can restore from the snapshot, and it should catch back up to the master from the snapshot's position automatically (as long as your expire_logs_days setting in my.cnf is longer than the duration since the snapshot was taken).

Re:“We have been experiencing a catastrophic DDoS attack” by eblanshey on Sunday September 04, 2016 @09:42AM (#12424263)
No need to take production offline when using the percona xtrabackup tool to set up the slave. It's super easy to use, and I've done it multiple times on databases in the hundreds of gigabytes.
Re:“We have been experiencing a catastrophic DDoS attack” by tempestn on Monday September 05, 2016 @03:31AM (#12428699)
That does look like a great tool! If we were on all InnoDB I'd probably try switching over to it instead of LVM snapshot-based backups right now. (Since it can do incremental, mostly.) We have a bunch of large MyISAM tables though (MyISAM used because the tables are read-only, so read speed is the only real consideration), so those would have to be handled separately. I could always xtrabackup all the innodb stuff and then just file copy the myisam tables separately though, since I know they won't be changing.

Hmm, may have to give it a try! Thanks.

Re:“We have been experiencing a catastrophic DDoS attack” by viraptor on Sunday September 04, 2016 @12:32AM (#12422707)
It's pretty much the same. You almost never want writes on both sides (now in a failover plan anyway), so as long as you have a switch for which side receives the writes, it's simple.
Re:“We have been experiencing a catastrophic DDoS attack” by monkeywork on Sunday September 04, 2016 @01:36AM (#12422895)
Site A, insure any writes use odd numbers in unique field.

Site B, insure any writes use even numbers for unique field.

This avoids conflict.

Re:“We have been experiencing a catastrophic DDoS attack” by echelon on Sunday September 04, 2016 @02:13AM (#12423010)
Or allow writes in both datacenters with randomized tokens as keys. If you need datacenter-affinity for certain events, use one of the token bytes to encode the author datacenter. Updates that don't have to land in order can be written in an eventually consistent manner. Write a feed of changes in each datacenter and have the peers consume this update feed. Viola, partition-tolerant master-master with failover.
Re:“We have been experiencing a catastrophic DDoS attack” by viraptor on Sunday September 04, 2016 @05:17AM (#12423490)
This is necessary but not sufficient to prevent issues. Sure, it will prevent auto increment key collisions, but unless you're using strict sessions everywhere you can run into other key consistency problems. For example if one master deletes a row while another updates it you'll end up with a missing key and stopped replication on the first one. (depends on the replication mode as well)
Re:“We have been experiencing a catastrophic DDoS attack” by porker on Sunday September 04, 2016 @10:12AM (#12424425)
Doesn't this work only for an append-only structure?

If I'm updating existing records, and the MySQL master at Site A gets updated, then goes down before Site B is updated.. I've got an inconsistent setup.

Been thinking about Master-Master MySQL replication recently as we have a system that's duplicated and taken offline each summer (to run a summer camp), and looking for a way to sync changes in it back to the main 'live' MySQL database.

Re:“We have been experiencing a catastrophic DDoS attack” by jovdg on Sunday September 04, 2016 @02:48AM (#12423134)
I do the same with tree nodes, works extremely well. Two active masters and one slave configured as master, conflicts are non-existant since I found out about this "trick".
Re:“We have been experiencing a catastrophic DDoS attack” by onetwotree on Sunday September 04, 2016 @02:50AM (#12423137)
If it's as easy and reliable as it is with Postgres (and I'd suspect it is), the answer is in my experience yes.
Re:“We have been experiencing a catastrophic DDoS attack” by lunaru on Sunday September 04, 2016 @04:44AM (#12423419)
which tool are you using for master-master on postgres?
Re:“We have been experiencing a catastrophic DDoS attack” by dwightgunning on Sunday September 04, 2016 @05:58AM (#12423597)
BDR isn't yet available in core Postgres. Postgres-BDR by a company called 2nd Quadrant seems to be the most widely used / best documented.

It can be installed as a plugin [1] and there are patched 9.4 packages available [2].

I set up a POC with databases in UK and US (east coast) last year. It was fairly straight forward and seemed to work well.

1: https://2ndquadrant.com/en/resources/bdr/ 2: http://bdr-project.org/docs/stable/index.html

Re:“We have been experiencing a catastrophic DDoS attack” by mordae on Sunday September 04, 2016 @08:41AM (#12424026)
Don't! Not until the next release. We use the 9.4 and it's very experimental.
Re:“We have been experiencing a catastrophic DDoS attack” by anthony_franco on Sunday September 04, 2016 @03:03AM (#12423172)
I set it up once like three years ago and it just works.

I switch between either master with just a DNS update that propagates within 5 minutes.

Re:“We have been experiencing a catastrophic DDoS attack” by noir-york on Sunday September 04, 2016 @05:01AM (#12423454)
We stuck with Linode after last Christmas too, but this new attack looks like the final straw.

How have you found Vultr?

Re:“We have been experiencing a catastrophic DDoS attack” by theyak on Sunday September 04, 2016 @02:06PM (#12425790)
We've moved off vultr. Too many network down times for no known reason and hard reboots on our servers causing loss of data. A friend has had similar experiences. Their support was also poor.
Re:“We have been experiencing a catastrophic DDoS attack” by mappu on Sunday September 04, 2016 @05:45AM (#12423557)
All's well so far! Happy to recommend them.

They seem to be the next biggest name in VPSes after Linode and DigitalOcean, with broadly similar price and quality.

Re:“We have been experiencing a catastrophic DDoS attack” by noir-york on Sunday September 04, 2016 @10:33AM (#12424511)
Thanks! Will give them a shot
Re:“We have been experiencing a catastrophic DDoS attack” by secure on Sunday September 04, 2016 @10:59AM (#12424653)
My VM on vultr has better performance than the comparable DigitalOcean one. Uptime is okay as well, haven’t had any trouble so far.
Re:“We have been experiencing a catastrophic DDoS attack” by busterarm on Sunday September 04, 2016 @01:48AM (#12422934)
We were sort of in the same boat as you last year. We were already prepping our failover and it was about 95% ready to go when the DDOS started on our Christmas break (and our senior guy who did all of our deploys was out of communication). December 23rd was a difficult 10 hour, remote day but we got things finished up and could relax afterwards.