Three years later, Mr. Moore is still letting us punt on database sharding
37signals.com
37signals.com
1. Amazon/Facebook/Google have a lot of traffic.
2. Amazon/Facebook/Google use X to scale horizontally. ergo:
3. My little startup should use X and scale horizontally.
What they fail to realize is that most of these companies would be ecstatic if they could scale machines vertically, if they could focus on great user features instead of having to figure out how to shard in the application layer. You should never forget that Amazon, Facebook, and twitter all started out as pretty basic LAMP stacks and built the tools when it was obvious that no other tool would do. I think google's an exception because their MVP was in fact a web scale application. So by all means, vet your idea, get some customers, get traction, and scale the cheap way by buying more ram for as long as you possibly can.
Before Google came along and showed the business people the benefits of horizontal scaling, any software engineer would be automatically considered crazy if they suggested an architecture that wasn't built on a central RDBMS.
So you have to weigh it against the other cargo-cult. How many startups along the way have failed due the inability to scale horizontally?
How many have failed due to too much cost and complexity associated with re-engineering an architecture in which the assumption of fully ACID transactions permeates the entire codebase? (While the phone is ringing off the hook because production systems are falling over under load.)
Long story short, I have to grant that you shouldn't worry about scaling up too soon or too quickly. But that don't go to the opposite extreme by putting it off until the last possible moment.
D igital Unix
N etscape Commerce Server
B erkeley DB (NoSQL!)
C code (linked into the HTTP server)
I'd call BDB "pre-SQL" rather than "NoSQL".
"Because VSL leverages powerful host CPU cores and memory for block mapping, ioMemory performance automatically improves as organizations upgrade host CPUs or memory" (http://www.fusionio.com/overviews/vsl-technical-overview/)
VSL (Virtual Storage Layer) is the Fusion-io software that makes an iodrive look like a block device to the OS, among other things.
(Yes, I'm an engineer at Fusion)
It could very well be a case of their growth is scaling in-line with Moore's law, so it just happens to work out well.
The point of the post is that in many/most cases, it's still easier and cheaper to throw hardware at a performance problem than to devote scarce engineering effort to optimization. And it's only getting more and more so. If you are a startup and you can throw $10,000 of hardware at a problem you can then keep your $100K engineers working on things that hardware alone can't solve.
I don't think so. Maybe we just have a different opinion on ordinary, but I come across people all the time that would think Excel is the normal thing to use for this (and pretty much any other task...). Using web applications for day to day workflow is still alien to a lot of "ordinary" business types.
I think this might be the tech bubble showing. I've never heard of any non-tech, non-startup companies using Basecamp. I'm not saying that they don't, of course, but I'd be interested to hear some case studies in its use outside of tech-savvy crowds.
Most programmers probably work at either BigCo enterprises (banks, insurance companies, telcos etc) or at "startup" type tech businesses or freelance agencies.
There are other industries that contain a lot of small businesses and probably employ very few programmers, think restaurants , local shops , small law or accountancy practices etc.
These guys probably aren't using sharepoint, most of them are probably using excel spreadsheets combined with paper.
I'm not sure how many of these guys are using things like basecamp but they a lot of them probably should be.
But yes, we're still tiny compared to behemoths like Sharepoint. All the more reason to be excited about the next 20 years!
And there was a great press quote for you in the comments: "$50 is peanuts for what you get in Basecamp. Any business doing $1000 a month should find huge leverage from it."
They've got logos for a few non-tech, non-startup companies on the Basecamp homepage: http://basecamphq.com
That doesn't always mean those companies actually use it. It just means someone with a @foocorp.com email address signed up.
I mean, go through a list of YC companies or other startups you respect, winnow it down to the ones that exited or otherwise achieved some level of success, and play guess-the-size. How many terabytes of storage do you think e.g. Airbnb needs?
Also, don't underestimate how large log files can grow in a data-driven business (like AirBNB seems to be). I could easily believe that they have many terabytes of data just from logging actions their customers have taken.
Logs don't have remotely the same access requirements as the databases used to serve a product.
That said, the blog post talks about enormous growth and it still fits inside Moore's Law's growth. I guess my gut is just saying it's not really that enormous in terms of startup scaling if it's still within those limits. Not to take anything away from 37Signal's success, but it feels like nothing of value was really added by this post. I present the post of a picture of 864GB of ram as supplementary evidence that is near the top of HN right now.
More so, if devs spent as much time tuning the performance of their apps as they did fantasizing about "web scale" architectural pivots they would typically be farther ahead. StackOverflow.com is a perfect example of this. They run on tiny handful of windows machines, support gobs and gobs of traffic, and have absolutely fantastic performance. And as much of that is due to paying attention to performance and making sure to find and remove the bottlenecks where they exist as it is to using cutting-edge architectures like database sharding, map+reduce, eventual consistency models, etc.
This is so true, though. Much of the horizontally scalability need comes from the land of extremely underpowered VPS machines on platforms like AWS. Yet the mind-boggling scale of performance you can inexpensively* (*-term used relatively) acquire for database servers is astonishing. SSDs (and plug-in flash drives) and boundless memory have changed everything.
they'll never lose your data
Amazon is not saying it, but EBS is probably lying when doing an fsync().In this post [1] explaining why Reddit was down, one problem was that the DB slave got ahead of the master, with the most probable explanation being that the master flagged the data as being safe for replication, before committing it to disk and I trust PostgreSQL more than I trust EBS.
In this forum answer Amazon is giving about this potential problem [2], they are dodging the question by saying that fsync() guarantees durability for instance failures, but not for volume failures, with the anual failure rate (AFR) being given as 0.1% - 0.5% for volumes (how accurate that is, it remains to be seen).
So EBS is probably lying about fsync's success, especially since the behavior of fsync in virtual environments is always a surprise. So you can definitely lose your data more frequently than if you had your own hardware.
[1] blog.reddit.com/2011/03/why-reddit-was-down-for-6-of-last-24.html [2] https://forums.aws.amazon.com/thread.jspa?threadID=27590
Given that POSIX says "the nature of the transfer is implementation-defined" and they've defined what fsync does on their implementation: No, they're not lying.
I wouldn't say that they're being misleading, either. On a local physical disk, once fsync returns your data is safely stored unless/until the disk dies. According to the forum post you linked to, semantics on EBS are exactly the same.
fsync does not mean "has been written to spinning magnetic media".
Who knows why they've stuck with AWS, though. It's possible Amazon is giving them a discount so they can be used as an example.
Actually, RAM would be the perfect application of the exact meaning of Moore's law: more RAM is an almost direct function of more transistors, and Moore's law is:
> the number of transistors that can be placed inexpensively on an integrated circuit doubles approximately every two years
Moore's law precisely predicts you can double your amount of RAM every two years for the exact same price. Which is pretty much what TFA is about.
SSD storage size is the same thing.
And, I'd argue, on two fronts: lower costs for the company, plus good marketing. Every forward-thinking company (at least from what I've observed) are eager to brand themselves as "carbon neutral", "eco-friendly", etc.
Nowadays, even the most basic PC can saturate a GigE link (115 MB/s), and the slowest hard drives go 100 MB/s. Any SSD sustains several thousands IOPS, and so on.
One of the most unfortunate result is that people often buy hugely powerful hardware when very basic stuff would have done the job just fine. How many people have I seen running puny workloads on 100k bucks 3Par or EMC arrays, where a handful of SSDs in a server would have done as well or better? Pulling 40Gb fibre across the room when cat 6 cable would have sufficed?
I can see how it would be less effort than sharding, but it seems like throwing hardware at the problem is not a completely "free lunch" when you get to the scale of having to custom design a server supercomputer and source specially made SSDs and terabytes of RAM.
http://www.dell.com/us/enterprise/p/poweredge-r815/pd http://www.dell.com/us/business/p/fusion-io-drive/pd
Punt does not mean avoidance. It has much closer associations to "attempt" (punter, plus rugby usage).
I totally agree with the rest of the article, why shard or otherwise distribute your database before being required? Although I think I would build my DB as shard 1 of 1 to allow for the future case.
So if I said "take a punt", would that be to take, or not take?
I should build a guide of "words not to use on presentations".