| ▲ | martinky24 a day ago |
| You don’t scale horizontally, do you? |
|
| ▲ | rcfox a day ago | parent | next [-] |
| Do most people? Not everyone is Google. |
| |
| ▲ | martinky24 a day ago | parent [-] | | Many people have more than 1 server that need to generate coherent identifiers amongst one another. That's not a "Google scale" thing. | | |
| ▲ | rcfox a day ago | parent [-] | | Your comment heavily implied (to me) scaling databases horizontally. Yes, it's not necessarily "Google scale" either, but it's a ton of extra complexity that I'm happy to avoid. But a Google employee is probably going to approach every public-facing project with the assumption of scaling everything horizontally. With multiple servers talking to a single database, I'd still prefer to let the database handle generating IDs. | | |
| ▲ | morshu9001 a day ago | parent [-] | | Yeah, there's too much advice jumping straight to uuid4 or 7 PKs for no particular reason. If you're doing a sharded DB, maybe, and even then it depends. Speaking of Google, Spanner recommends uuid4, and specifically not any uuid that includes a timestamp at the start like uuid7. |
|
|
|
|
| ▲ | morshu9001 a day ago | parent | prev [-] |
| This is Postgres. There is Citus, but that still supports (maybe recommends?) serial PKs. |