News for hackers. Stuff that matters.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by igammarays on Monday May 20, 2024 @06:51AM (#40414140)
I wonder if 1.7 petabytes of data (1T indexed records) could fit on a single (very) beefy baremetal server for under a couple thousand dollars a month, served by SQLite.

Like this: https://use.expensify.com/blog/scaling-sqlite-to-4m-qps-on-a...

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by kondro on Monday May 20, 2024 @07:05AM (#40414204)
Given 30.7TB SSD’s are about $5500 each and you’d need 56 to to get to 1.7PB (with no redundancy). Not to mention that SQLite’s maximum DB size is 140TB.

I don’t think you’d be able to fit this much storage into a single machine, especially not for a few thousand a month and SQLite wouldn’t be appropriate for this use-case.

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by Neil44 on Monday May 20, 2024 @08:13AM (#40414606)
At the moment they're just paying someone else to buy $5000 SSD's and run a database on them at many X markup.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by omeid2 on Monday May 20, 2024 @09:45AM (#40415411)
There is no upper bounds to economy of scales. Maybe there is for the cents per GB of raw storage, but power usage, security, rent, and everything else scales too, and few of them have upper bounds on economy of scales.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by Retric on Monday May 20, 2024 @10:02AM (#40415571)
Economies of scale generally have upper limits. Often when you approach the largest scale the existing market will supply you essentially need to become your own supplier which then runs into span of control issues. The organization needs to become competitive in that new market or their costs increase.

Keep scaling and eventually vertical integration ends up looking like a Soviet style planned economy. Your remote mining town needs some way for people to get soap etc so you open a store with it’s own supply chain etc etc.

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by omeid2 on Monday May 20, 2024 @09:42PM (#40423109)
Yes, there is an upper limit, and that is the entirety of global economy. But that assertion is as useless as it is true.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by Retric on Monday May 20, 2024 @11:44PM (#40423857)
Hardly the global economy, even approaching a global monopoly for something tends to hit such limits. Few companies deal with this today because most markets are fragmented.

But even at the 30% marketshare the iPhone has been dealing with these issues for a while. They just can’t buy 200 million volume buttons or whatever off the shelf. Now imagine what happens if one of their suppliers would fail days before the phone launches. They have such tight integration not just with the manufacturer’s process but also their finances because Apple simply can’t get replacements at scale on short notice. And remember that’s at ~30% market share, it just gets worse after that.

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by omeid2 on Tuesday May 21, 2024 @04:28AM (#40425570)
Outsourcing doesn't mean off the shelf. Apple still works with third parties to manufacture parts as they can leverage the scale of their overall operations to do it cheaper than it would cost apple to do.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by Retric on Tuesday May 21, 2024 @08:24AM (#40427483)
They aren’t just working with from a design or quality control standpoint that’s normal enough, they are also purchasing equipment for 3rd party companies to use which isn’t. At this point they need to be world class experts in everything from batteries, sensors, software, and processors to glass.

Tesla does some stuff in house because they can, but they just didn’t have any options when it came to scaling battery production. They hit the limits of what the market could supply without getting directly involved.

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by omeid2 on Wednesday May 22, 2024 @11:20PM (#40450106)
Why are these companies going so far as purchasing equipment for 3rd parties instead of doing it in house?
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by Retric on Thursday May 23, 2024 @06:11AM (#40452787)
Several reasons, both from Apples perspective and the supplier’s.

Suppliers don’t want to purchase a bunch of equipment and scale their manufacturing capacity for a contract that could go away at any time. So when Apple shows up they are going to price that risk in to their bid or sometimes just outright say no. However, by Apple buying that equipment those risks suddenly get reduced.

Apple on the other hand has huge cash reserves and isn’t that price sensitive. Plus they want to avoid all the issues bring yet another component in house.

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by omeid2 on Friday May 24, 2024 @09:20AM (#40465990)
That is a long way of saying "economy of scale".
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by bayindirh on Monday May 20, 2024 @07:17AM (#40414273)
If you install a RAID controller and a couple of disk boxes, it's possible with 1:1 replication, or with backups. 60 disk 3.5" units already exist, so 2.5" SSD racks. It won't be cheap, but will be resilient and fast. Bloody fast if you have the budget.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by zaphirplane on Monday May 20, 2024 @07:39AM (#40414390)
> or with backups take a while to restore a PB and a way to take a hot backup without impacting the service that by itself is a task or snapshots which is more disk

> 1:1 replication Depending on the amount of writes could be a ton of extra disk and a bucket for network cost

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by bayindirh on Monday May 20, 2024 @07:50AM (#40414445)
These systems support zero-downtime snapshots. You tell it to snapshot, it instantly snapshots, you can run a differential/incremental backup at great speeds. Your RAID controller is already caching the hot data, so the impact is minimal.

Except network cost there's no extra disk required. It's just broadcasted writes consumed on the other hand.

These boxes are not dumb JBODS. They support their own replication/backup subsystems, so everything is transparent.

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by Closi on Monday May 20, 2024 @11:39AM (#40416709)
Resilient and fast from a disk perspective, but in practice massively bottlenecked by the fact that Sqlite can only have 1 writer at a time.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by ndriscoll on Monday May 20, 2024 @11:09AM (#40416401)
There are 61.44 TB NVMe drives (best price I've seen right now is ~6200. They were ~4800 earlier this year). You can have a 1U server with 32 E1.L slots so you should be able to fit ~1.9PB raw storage into 1U for a little over $200k. Don't know how business financing works, but at 8% interest with a 5 year amortization, that's a bit over $4k/month.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by mobilemidget on Monday May 20, 2024 @01:14PM (#40417681)
Do you have any good recommendation for such 1U server with 32 slots? Thanks
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by perryh2 on Monday May 20, 2024 @01:52PM (#40418088)
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by hallway_monitor on Monday May 20, 2024 @07:42PM (#40422021)
Shows 2U in order to fit 32 drives, but hopefully you can find a 2U slot for this absolute monster of a storage box if you have that need.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by ndriscoll on Monday May 20, 2024 @08:59PM (#40422813)
This one is 1U and supports dual socket CPU and 6 TB RAM:

https://www.supermicro.com/en/products/system/1U/1029/SSG-10...

I've never done procurement so can't really speak to recommendations. I just see that the products apparently exist.

There's also 32 drive 1U JBOF enclosures for more expansion:

https://www.supermicro.com/en/products/system/1u/136/ssg-136...

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by jakjak123 on Monday May 20, 2024 @05:44PM (#40420790)
Our ops team actually wanted to do this, but we on the project have nightmares from putting 1PB of database on a single host ><
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by andreygrehov on Monday May 20, 2024 @07:45PM (#40422073)
Nimbus ExaDrive is 100TB [1].

[1] https://nimbusdata.com/products/exadrive/

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by choppaface on Monday May 20, 2024 @03:50PM (#40419486)
StorageReview plays with 2PB flash machines all the time https://www.youtube.com/watch?v=UQMKtlIjeuk

1PB in a rack with spinning rust + flash buffer has been easy for years now.

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by sanderjd on Monday May 20, 2024 @07:18AM (#40414282)
Sometimes things just aren't nails, even when you have a really good hammer.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by BlackLotus89 on Monday May 20, 2024 @07:07AM (#40414215)
No it won't. sqlite "only" works with up to 281TB [0] [1]

[0] https://www.sqlite.org/releaselog/3_33_0.html

[1] https://www.sqlite.org/limits.html (#12)

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by sgt on Monday May 20, 2024 @07:09AM (#40414226)
You can split up into 10 SQLite DB's on this individual server.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by mlnj on Monday May 20, 2024 @07:54AM (#40414467)
Just storing petabytes of data is not the issue. Managing and querying it reliably is.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by zaphirplane on Monday May 20, 2024 @07:47AM (#40414436)
> You can split up into 10 SQLite DB's on this individual server.

1 is a scalable, managed, highly available service, with economies of scale the other is a fixed size, capital expenditure with fixed performance, limited DR, requiring a couple of SRE/DevOps and colo

There is also the will it always work question

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by cdchn on Monday May 20, 2024 @07:40AM (#40414402)
You've now implemented sharding on top of SQLite.

Eventually all programs will be able to read email.

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by mrbungie on Monday May 20, 2024 @08:10AM (#40414582)
Any non-trivial complexity codebase eventually implements a mediocre SQL/Lisp/etc.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by Closi on Monday May 20, 2024 @10:18AM (#40415724)
Exactly! Why take a system not designed for this sort of scale and force it to scale, rather than use systems which are designed and tested for this scale and volume? All you will do is hackily re-invent all the other things that the other databases had to do to scale to this extent.

Plus size is only one limit, you would be limited to 1 write every few milliseconds. My napkin maths estimate is that there are at least 1-2m writes per hour going into this thing, so probably 300-600 writes / second (Average) and maybe over 1k writes/second peak. We are going to fall over here!

Not sure why some people seem to have a viwe of "There is no scaling problem that can't be solved with a sufficient enough number of SQLite databases".

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by chasil on Monday May 20, 2024 @11:57AM (#40416892)
Beware of WAL mode, as you sacrifice ACID in this configuration.

https://sqlite.org/lang_attach.html

'Transactions involving multiple attached databases are atomic, assuming that the main database is not ":memory:" and the journal_mode is not WAL. If the main database is ":memory:" or if the journal_mode is WAL, then transactions continue to be atomic within each individual database file. But if the host computer crashes in the middle of a COMMIT where two or more database files are updated, some of those files might get the changes where others might not.'

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by nemothekid on Monday May 20, 2024 @03:02PM (#40418918)
Once you are splitting up 10 sqlite dbs you have a bespoke distributed system anyways, and you will find yourself doing all the headache of LedgerStore anyways.

Most of the novel work in LedgerStore is probably around managing the headaches of distributed storage, not the persistence layer.

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by tinyspacewizard on Monday May 20, 2024 @07:08AM (#40414225)
Also a bit scary to have a system without a scaling mechnism built-in in the path of customer traffic. At some point you may be racing to upgrade it.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by riku_iki on Monday May 20, 2024 @07:12AM (#40414243)
it will take forever to create that index. Link describes 10B rows dataset.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by sgt on Monday May 20, 2024 @07:09AM (#40414230)
How would you replicate that SQLite DB onto other hosts to achieve redundancy?
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by thangngoc89 on Monday May 20, 2024 @07:19AM (#40414284)
One could use Litestream [1]

[1]: https://litestream.io

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by szundi on Monday May 20, 2024 @07:31AM (#40414352)
What if a continuous replication system has a bug one day, and you realize you are just a bit corrupted and have to rerun? Or is it the same with cloud tools?
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by thangngoc89 on Monday May 20, 2024 @07:42AM (#40414408)
That's why you always test your backup. I backup the full sqlite.db every day and test the litestream replication every week. So far litestream have been solid.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by mickeyp on Monday May 20, 2024 @07:56AM (#40414483)
Would you care to tell us what your backup and restore policy would be for 1.7 PB of data?
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by thangngoc89 on Monday May 20, 2024 @08:03AM (#40414527)
I'm replying to the question of how one would replicate SQLite 3 in production for redundancy. I myself consider 10GB would be the limit for using SQLite 3 in read/write in production and switch to PostgreSQL.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by sgt on Monday May 20, 2024 @09:14AM (#40415110)
That's a huge discrepancy. One half of HN wants to put petabytes on SQLite, while your limit is only 10GB.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by Closi on Monday May 20, 2024 @10:21AM (#40415753)
Why not use SQLite's own guidance on where SQLite probably isn't appropriate:

- Client/Server applications (Check)

- High-volumes (Check)

- Large datasets (Check)

- High concurrency, particularly for writes (Check)

https://www.sqlite.org/whentouse.html

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by squeaky-clean on Tuesday May 21, 2024 @03:12AM (#40425109)
There's only one person in this thread trying to put petabytes in SQLite. Everyone else is telling them the myriad reasons why it's a terrible idea.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by zaphirplane on Monday May 20, 2024 @07:50AM (#40414444)
By the time the TB is restored, time to start the next test

How do you detect restored but bit flipped data ?

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by thangngoc89 on Monday May 20, 2024 @08:00AM (#40414509)
I do this in backup testing:

    sqlite3 /path/to/db
    sqlite> PRAGMA integrity_check;

See SQLite3 documentation: https://www.sqlite.org/pragma.html#pragma_integrity_check
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by zaphirplane on Monday May 20, 2024 @08:21AM (#40414672)
Sounds like it will take awhile for TB and it checks db integrity not data integrity
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by jeltz on Monday May 20, 2024 @11:27AM (#40416587)
Then the same happens as when there is a bug in Aurora's replication. You lose data. I know this from personal experience.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by anonzzzies on Monday May 20, 2024 @12:45PM (#40417359)
Any open source doing something similar ?
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by jiripospisil on Monday May 20, 2024 @01:12PM (#40417663)
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by anonzzzies on Monday May 20, 2024 @01:17PM (#40417716)
Ai. I remember another product and thought it was this. Sorry. Move on and keep up the good work.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by khaki54 on Monday May 20, 2024 @08:52AM (#40414934)
The value proposition of commercial loud isn't cost savings unless you manage to quantify all of the ancillary and extrinsic factors such as security risk, HVAC, datacenter personnel, and hardware lifecycle. Any well capitalized and organized company could build their own cloud much more cheaply, but really a significant portion of the calculation is outsourcing the risk components.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by igammarays on Monday May 20, 2024 @10:53AM (#40416197)
The problem with outsourcing the risk components is that you don't know for sure whether they are properly taken care of. Major cloud providers have been caught "oopsing" your data, and bam it is gone. Furthermore, they have no incentive to be more efficient about it, they could easily be using 10x the amount of resources necessary, and you wouldn't even have a clue, you're just paying for evermore expensive crap that becomes less reliable over time.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by ddorian43 on Monday May 20, 2024 @11:22AM (#40416547)
But the cloud providers compete with other other! Look at the efficient market in display in their bandwidth pricing!
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by PretzelPirate on Monday May 20, 2024 @12:09PM (#40416999)
For very large customers, the cloud providers do compete with each other on cost. They often pay different prices than are advertised.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by ownagefool on Monday May 20, 2024 @03:18PM (#40419090)
> Any well capitalized and organized company could build their own cloud much more cheaply

Lots of orgs fail to turn money into talent and then talent into products.

It just takes one bad hire at senior level and suddenly your cloud is a vmware install where all machines are boot off network disk, and contention makes the entire thing fall over.

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by pclmulqdq on Monday May 20, 2024 @09:21AM (#40415168)
You wouldn't want to do 1T records on one server even if you could. At that scale, you would prefer to be somewhat distributed for availability and scalability. Also, SQLite has issues at large scale.

A reasonable number for one server is about 32-128 TB, and 1.7 petabytes with some redundancy fits nicely in ~30 servers with a decent distributed database.

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by klysm on Monday May 20, 2024 @09:42AM (#40415375)
Sure but then you get a whole new set of costs and folks you have to hire to maintain that hardware.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by siva7 on Monday May 20, 2024 @09:48AM (#40415448)
Maybe it could and now you got 99 new Problems. That's why more experienced decision makers won't allow this to happen.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by Closi on Monday May 20, 2024 @11:35AM (#40416676)
1.7 petabytes on Sqlite?

Sqlite's own advice:

> If your data will grow to a size that you are uncomfortable or unable to fit into a single disk file, then you should select a solution other than SQLite. SQLite supports databases up to 281 terabytes in size, assuming you can find a disk drive and filesystem that will support 281-terabyte files.

> Even so, when the size of the content looks like it might creep into the terabyte range, it would be good to consider a centralized client/server database [over SQLite].

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by cheeze on Monday May 20, 2024 @02:43PM (#40418666)
This is the worry IMO. It's fine to dump it on a server with SQLite, but once you start hitting scaling limits, you're in for a potentially rough migration.
Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by faizshah on Tuesday May 21, 2024 @03:43AM (#40425255)
You just shard it into much smaller SQLite DBs by a partition key if you really wanted to do this.

Not really sure why you would subject yourself to this though, would be way easier just to use Cassandra/Scylla.

Re:Uber Migrates 1T Records from DynamoDB to LedgerStore to ... by callalex on Monday May 20, 2024 @01:42PM (#40417996)
One of the main reasons you put up with the annoyances of tuple-based storage like DynamoDB is because you want extremely high availability that simply cannot be provided by one computer in one physical location.