6 ms·
Why did we take reddit down for 71 minutes?
- jbellis 17y ago"Memcachedb also has another feature that blocks all reads while it writes to the disk." Seriously? Wow.
- davidw 17y agoSounds like it's time to look at Redis...
- simonw 17y agoOr Tokyo Cabinet / Tyrant, which is still a high performance key/value store but doesn't need to fit everything in RAM. Depends on how much they're storing.
- strlen 17y agoIf the data isn't "optional" (i.e. if there's a cache miss, you can't just go to a traditional database for a somewhat higher - but acceptable - cost), "memcached with persistence" approach isn't going to cut it. You now have a distributed system with state, which is a much more difficult problem. That's why there are so many distributed storage systems: there's no "one fits all" solution that can handle every theoretical corner case (even Google hasn't solved that). In my (biased) view, the eventually consistent stores (e.g. Dynamo-inspired ones or even "Friendfeed/Facebook model" of sharded and replicated MySQL databases storing Blobs) do seem most reasonable for web-type problems.
- mrduncan 17y agoVirtual memory support is currently being added to Redis so that it won't need to fit everything in RAM either. I'm sure antirez can provide some better info on how it'll work.
- antirez 17y agoHello, VM is already in alpha on Git actually. There is some more work to do, but I don't think in the Reddit use case there is the need of Redis VM: they are using MemcacheDB as a persistent cache, if it's a cache it should match very high performances delivered by memcached and is not required to cache everything. Redis is as fast or faster than memcached (using clients with the same performances) and is persistent, so probably it's a good fit for this problem. Instead of VM Reddit should use Redis EXPIRE I guess, that is, time to live in cached keys so they auto expire. Btw for people that don't know what Redis Virtual Memory is: with VM Redis is able to swap out rarely used keys in disk. This makes a lot of sense when using Redis as a DB. When using Redis as a cache, the way to go is EXPIRE: rarely used things in cache should simply go away and be expired instead of being moved into disk. EDIT: It would be very interesting to know where the Reddit performance problem is, but Redis Sorted Sets are a very good match to create social-news alike sites like HN or Reddit in a scalable distributed way, with a few workers processing recent news to update their score into the sorted set. The home page can be generated with ZREVRANGE without any computation. It's a shame reddit is not sharing how this cache is used.
- deleted 17y ago[deleted]
- jbellis 17y agoWell, no; if they're using memcachedb presumably their data doesn't fit in memory on a single machine. Cassandra would be a better choice. /cassandra committer, but it would :)
- jedberg 17y agoWe actually looked at Cassandra and found it to be slower than memcachedb. However, we readily admit that we probably configured it wrong.
- jbellis 17y agoHard to say, but we increased speed pretty much across the board about 50% from 0.4 to 0.4.2, by 50% (compounded :) to 0.5, and looking at 100% already for release-after-0.5... and we're ready to help configure on IRC :) (Also, I'm not sure when you were looking at it, but bootstrap -- adding nodes without any downtime -- is done now.)
- antirez 17y agoWhen Redis is used as a persistent cache, the clients implementing consistent hashing are perfect fit for a distributed-redis, as you don't need all this data safeness. You can lose a node if there is a disaster without too much problems usually (like it happens in memcached), but you want, in normal conditions, that the cache is not volatile.
- jbellis 17y agoIt sounded like they want to use it as more of a "real" database than a cache, since rebuilding data in case of a hardware failure is so painful. <shrug>
- patio11 17y agoQuite seriously. I use memcachedb in my deployment of A/Bingo (it isn't limited to that), which avoids using a SQL database because I wanted it to be blazing fast for people who having significantly higher traffic sites than I do. The typical case performance on my site is fantastic. The worst case performance is an abomination -- when it flushes the site essentially pauses for all users for five seconds. This is tolerable for me, but only just. The reason I use memcachedb as opposed to vanilla memcached is because I was worried about persistence in the event of a server failure, but given that I can count resets of my server over 3.5 years on a single hand, I might just decide "In the event of a server failure, I lose any A/B tests in progress and have to start over. Oh well!"
- rubyrescue 17y agosounds like a redefinition of 'in any way' to me... So why am I singing the praises of Amazon and EC2? Mainly to dispel the opinion that the site getting slower since the move is in any way related to Amazon...(snipped)...Unfortunately, the single EBS volumes they were on could not handle these bursting writes.
- aaronblohowiak 17y agoThis isn't an EC2 issue, this is a SAN issue. Wether it is EBS or an NFS drive, meh. This is an architecting issue and while it is a result of the underlying hardware, the underlying hardware is not the constraint.
- rubyrescue 17y agoagreed it's largely an architecture issue, however poor EBS performance is contributing factor and he seems to go out of his way to say that it's not...
- pavs 17y agoHe went out of his way because most reddit user keep blaming AWS for the recent issues, as jedberg (reddit IT guy) recently mentioned the problem is not with AWS scaling but with reddit software scaling.
- jedberg 17y agoBlaming poor EBS performance would be like blaming Intel for their 4GhZ processor not being able to do your protein folding in 5 seconds. It is simply a known limitation that has to be worked around. Even if we owned the servers, we would have the same limitation -- eventually you just can't get the performance out of a single disk.
- ShabbyDoo 17y agoI'm bothered by the need to run SW RAID on top of HW RAID. One would think that Amazon would sell faster EBS "disks" for a premium. And slower disks for a discount? But, I guess that's what S3 is for.
- psranga 17y agoI think it works like this: Even if Amazon uses 'k' hdds for one EBS "disk", since you're sharing the real hdds with other users, you don't get 'k' hdds' performance, you only get a fraction. By RAIDing over 'n' EBS "disks", you are effectively compensating for the reduced performance due to sharing.
- ShabbyDoo 17y agoI get what the stack looks like, but it seems really broken and likely quite inefficient. Thus far, Amazon has gone after greenfield applications which can be written within the constraints of their cloud platform. However, there are a ton of people hosting their own SQL database-based apps where a single DB is the bottleneck. Without significant refactoring, these apps can only scale vertically with the DB. So, while Amazon provides nice, big boxes to run SQLServer/MySQL/etc., disk performance is that of a desktop machine -- hardly a balanced system. How many more customers could they capture if they offered premium, high-performance storage options?
- wmf 17y agoAn EBS volume has the performance of a ~10-disk RAID; it's hardly desktop class. It would be nice if they offered wide-striped volumes, but Amazon's strategy is to not do anything that customers can kludge for themselves.
- ShabbyDoo 17y agoThis guy's blog posting suggests otherwise: "Remember, the speed and efficiency of the single EBS device is roughly comparable to a modern SATA or SCSI drive." http://af-design.com/blog/2009/02/27/amazon-ec2-disk-performance/ http://af-design.com/blog/2009/02/27/amazon-ec2-disk-perform... Perhaps EBS has improved drastically over the past year?
- deleted 17y ago[deleted]
- dgreensp 17y agoReddit is down super-often for me. This very minute, I can't log in or use the site logged in, it just serves me 503 errors.
- jacquesm 17y agoOne major reason not to hop on the cloud bandwagon just yet is issues like these. The more layers underneath that are not under your control the more layers you'll have to add to remedy that. Systems with excessive complexity are hard to debug, especially when it comes to analyzing performance issues. Given complete control of the hardware from the ground up it can already be quite hard to accurately pinpoint a bottle neck so you can solve it. Adding a lot of stuff between your code and the hardware is not going to make that any easier. Typically a stack has 6 layers before you get to your application: drive, controller, driver, filesystem, database, app. In a cloud environment anything under the filesystem layer is effectively out of your control and out of your ability to troubleshoot. The solution, to add another layer of complexity in order to combat the slowdown is really the opposite of what an ideal cloud environment would give you. After all, the #1 selling point of the cloud is scalability and performance. I think that it would be best if Amazon worked together with the OP to resolve the issue as a problem ticket rather than to try to solve it by adding a software raid. Of course, that's just armchair reasoning, not being in the hot seat makes life easier.
- scott_s 17y agoAfter all, the #1 selling point of the cloud is scalability and performance. I think you're missing the key component that it's scalability and performance that you don't have to manage yourself. And, yes, when you don't manage it yourself, it's going to be much more difficult to diagnose performance problems. But someone else managing the infrastructure also means that people who would be incapable of diagnosing the problem anyway (either from lack of expertise or lack of time) have access to the resources.
- jacquesm 17y agoIt definitely looks as though they ended up having to manage it themselves. Basically this seems to put a fairly low upper limit to using 'the cloud' for something a little larger before you get back exactly the same kinds of issues that you were dealing with when using self-hosted hardware, only at a higher price point.
- shrike 17y agoDoes anyone know if reddit is doing anything special to create the RAID? Or is it just mdadm?
- jedberg 17y agoJust mdadm.
- mark_l_watson 17y agoI really like 'behind the scenes' stories like this from big sites like Reddit, Facebook, Heroku etc. I work on a smaller scale of a few EC2 at a time, but I really enjoy the scaling info.