HBase Deprecation at Pinterest
medium.com
medium.com
> Introduced in 2013, HBase was Pinterest’s first NoSQL datastore. Along with the rising popularity of NoSQL, HBase quickly became one of the most widely used storage backends at Pinterest.
Followed by,
> For the past few years, we have seen a seemingly steady decline in HBase usage and community activity in the industry, as many peer companies were looking for better alternatives to replace HBase in their production environments. This in turn has led to a shrinking talent pool, higher barrier to entry, and lower incentive for new engineers to become a subject matter expert of HBase.
Lets see how TiDB holds on in the same timeframe, although being boring SQL might keep it around.
I don’t think this is correct. When I started in late 2013 Redis was being used as a persistent data store. And what pain it was. I convinced leadership in late 2014 this was a bad and they had me keep it alive until it was replaced by MySQL in mid 2015.
HBase was nothing but pain at Facebook where it was supposed to replace MySQL and then Pinterest where… I think there was hope it would replace MySQL. Once I automated MySQL at Pinterest I think it wasn’t so bad, particularly given the absurdly limited staff they gave the problem.
It is a very different landscape these days!
This is not a snarky comment from an outsider, I very much work at such a company. It's ridiculous.
Edit: But I must admit that most of this was probably developed 10 years ago when the ecosystem was much more limited. At least they now came to the conclusion that it's time to move on. I would not have recommended Postgres 10 years ago and even today there is no way it would work at the scale of Pinterest.
Seeing working technology replaced because someone doesn't like it, get accolades for it, only to face the same limitations as old tech is just depressing.
In 2008, scaling was really hard. And the senior engineers at that point had been badly burned by trying to scale during the 2000-2005 period.
The comment about servers of the time being less powerful than smart phones of today is spot on.
Kubernetes, which it runs on, wants etcd.
Keycloak wants to use Postgres and Redis for sessions.
Plausible Analytics wants to use Clickhouse and Postgres. Matomo specifically wants to use MySQL.
Lago Billing wants to use Postgres, Redis and Clickhouse.
Prometheus uses TSDB, but okay, it’s “just” files and a WAL. Wait a minute, so is Postgres…
Jaeger wants to use Cassandra or Elastic.
Thanos wants S3 APIs. So maybe you use Minio.
Okay. That’s 2024: in production, you will wind up with 7 different databases. At least.
Now try running Postgres on vintage hardware from the period and you quickly see why we did what we did.
I've worked with so many teams who chase the newest and shiniest database, deploying hundreds of nodes, and spending hundreds of man-hours staffing a sysadmin team to maintain it, only to eventually replace it with an old fashioned Postgres box. You just need an experienced DBA.
Edit to add: many claims of "Postgres doesn't work at our scale" are frankly BS, and in large part due to an inexperienced ops team. Take a look at the top post on frontpage right now, for example: https://news.ycombinator.com/item?id=40372296
I wouldn't be because I was hired after a team of very experienced DBAs saw their databases melt when trying to run analytics queries on the production database in 2012 for a telco.
We then moved to HBase so analysts could figure out what parts of the network needed extra towers installed for peak demand with 15 second intervals. You can do this today because the database sits on a machine that is between 10 to 100 times as capable as what we had back then and the number of people using cellphones hasn't increased substantially.
Again, don't look at this technology by what you can do today, but by what you could do back then.
Imagine having to deal with multiple data stores for your daily development but then go on-call for a week and have to deal with twice as many plus the inevitable lack of runbooks etc.? I personally have a big tech experience with the same data store proliferation in an organization with pretty solid RDBMS use. In the last 3-4 years we've been undoing the damage and migrating data. Toil for engineers is lower and uptimes are better.
It's easy to look back and think we were idiots for doing it that way but you need to remember that the average server in 2014 has the power of the average smartphone today.
Even things like protobuf or Avro weren't as broadly adopted (>80%) at the time, many many companies at the time persisted stuff using JSON or other text formats (which in retrospect was very dumb, but it was very normal for a while).
Example: TiDB at a certain time didn't write rows clustered by the primary key on disk (they had a separate index). This is very costly in distributed setups (less costly on single-node setups like PostgreSQL).
There are many such cases in many dbs. Another point lacking in most dbs is the "lsm compaction overhead" you need to do for all replicas when you're not using shared distributed storage.
This optimization can be seen on QuickWit (building/compacting inverted index is even more expensive than LSM compaction).
In SQL world we call this "denormalization". It's called the same thing in NoSQL, too.
For one comparison, Tumblr hit 100 billion unique rows of relational data in MySQL (on masters, not including replicas) back in October 2012. So they're easily in the trillions of rows today, and Tumblr is smaller than Pinterest!
My wife has a Pinterest board.
This is the real killer. HBase uses Hadoop for its replication. That replication does 3 copies in the same data center. If you're a company that requires online data of this scale, you probably also have several other data centers or clouds. Having to replicate entire datasets 3x for every new data center is cost-prohibitive.
That, along with the fact that HBase has issues at NVMe speeds and throughputs, are true issues.
You can set replication factor 1 if you want. You just will have high chance to lose your data forever.
There are people who run HBase with Reed Solomon encoding on the HFiles (the store files). That can get a replication factor below 3. I don't think that Pinterest ever ran an updated enough Hadoop for that to be available.
> You can set replication factor 1 if you want.
You can't, really. HBase will fail to open regions that have files that aren't able to be read. So setting the replication factor to 1, have a single hard drive go out and the table will forever have regions that can't be opened. The name node will have a file that's got lost blocks. HMaster will pass around the region assignment until it sticks failed to open.
Can someone from Pinterest comment on specific performance needs (SLOs) that influenced their choice between TiDB and other solutions, including managed services? Considering complexity and cost, could an MSP have addressed their needs effectively?
https://static.pingcap.com/files/2023/07/19065834/BRO-Pinter...
https://medium.com/pinterest-engineering/online-data-migrati...
Is that HBase's fault, or Pinterest's added complexity?
I'm baffled when databases don't support seamless in-place upgrades, and require a full dump and restore instead. At certain scale a full rebuild is as complex as replacing wheels of a moving car.
* A few notable exceptions exist where Hadoop and HBase upgrades were necessary simultaneously. These have been awful experiences that required huge efforts to accomplish.
Is every article written by ChatGPT now? My confusion was partially answered as soon as I saw the word "delve."
Also this article doesn't feel like it's written by ChatGPT at all. "Delve" is not even a very uncommon word; just one use of it isn't necessarily indicative, and even if it was, it's used in the summary of the rest of the series (which you seem to have missed in your hunt for gotchas)! I think LLM bullshit is definitely making everything a lot worse but this isn't even an example of such.