Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A lot of this makes sense (DBAs gating features! shudder).

But I'm not totally clear on why a switch from Postgres to MySQL was warranted.

Just because Postgres can do stored procedures well doesn't mean that it's effectively a stored procedure server. It also happens to handle SQL pretty well too. :)



The answer to that is simple, even with the little information given: Flikr used MySQL, the CTO driving the changes at Etsy came from Flikr, therefore, Etsy now uses Flikr.

Given their existing investment in Postgresql, I can't imagine they suddenly had more experience internally with MySQL, though the CTO may have been the only person with any horizontal DB scaling experience since Etsy didn't scale before.

I've seen the pattern of "CTO changes tech to something he/she is familiar with" many times. Sometimes that's good; mostly, it annoys the teams who are now less efficient. We certainly don't have enough info here to know. The scaling argument (his knowledge thereof, not Postgresql's "inability") is pretty compelling.


If you read the comments that preceded yours in responding to my question, you'll see that there are perfectly apolitical reasons for them to have done this move; they wanted a scale-out less DBA-controlled database, and at the time there wasn't a built-in Postgres way to do that.

Also, knowing how to scale DB X and not knowing how to scale DB Y often means scaling DB Y is a science project.

I feel bad for baiting people into psychoanalyzing Etsy's team.


There still isn't a built-in way in postgres to do master-master replication.


Neither is master-master built into MySQL.

You can apparently do that with Galera, but I haven't seen that in production.

What they're referring to is most likely MySQL's half-baked "circular replication". Some people claim it works for them. Personally I tried it once and the usual MySQL replication issues (desync, InnoDB deadlock) would create much more uncomfortable situations than in a Master/Slave setup.

With master/slave you at least stand a chance of having one half of the pair survive through a problem. With circular replication the cluster would lock up hard almost every time for us, and - to add insult to injury - leave the pair inconsistent after recovery.


I think the confusion here is based on the difference between "multi-master" replication and "master-master" replication. MySQL doesn't support the former, where a machine can be a slave of more than one master, but it does support (like you eluded to) having two masters (usually one writable, one read-only) in a loop, which MySQL folks call "master-master" replication.


Whatever your opinion of MySQL's replication, the MySQL community calls it master-master.



Based on the zero information I have I'm going to assume that there was probably more knowledge on the team about how to make MySQL do what they needed than Postgres. That's usually all the reason anyone really needs.


That's not my take on it. Their old PostgreSQL system was largely monolithic, they needed something that scaled well horizontally, so they went with MySQL. Makes perfect sense to me.

PostgreSQL has many, many strengths over MySQL, but historically replication wasn't one of them. Built-in replication didn't come to PostgreSQL until version 9, and until then various poorly scalable trigger based log shipping schemes (like Slony) were used. I wouldn't be surprised if PostgreSQL's built-in replication system with version >= 9 works quite well nowadays, but I think at the time Etsy were considering the switch there was still quite a lot of FUD around replication.


You are confusing triggers with log shipping.


They say they use master-master replication with mysql so they have no single points of failures. Back then, I think the only option with postgres was to use slony.


This is correct, master-master is necessary to shard as we have implemented it.



..and if you've used slony in anger, you know using slony isn't really an option.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: