5 ms·
I care because it usually goes like this: Product manager > "Niche sass app {x} will never need to support more than 10-20 users" Two weeks after launch > "We
by devduderino 10y ago
I care because it usually goes like this:
Product manager > "Niche sass app {x} will never need to support more than 10-20 users"
Two weeks after launch > "We have 10k users and counting, why didn't you architect this for scale?"
Always assume you underestimated the scope of the project.
- virmundi 10y agoI've literally been waffling back and forth between UUID and BigInt for the last week. The reason for this is I need to handle eventually distributed systems. Do I need UUIDs? Maybe not, but after much debt, I've decided that the storage requirements of such an index in memory is worth the ability to move from Postgres to Postgresql-xl.
- qaq 10y agoThe problem is not with memory problem is that after checkpoint postgres will do full page writes for serial you will be touching way fewer pages compared to UUID so write amplification for UUID vs bigint can be 60X+
- virmundi 10y agoCan you go into a bit more detail? I've seen amplification referenced before. My estimation is that the database will be pretty much read heavy. I will need to split a given database across multiple instances.
- qaq 10y agohttps://blog.2ndquadrant.com/on-the-impact-of-full-page-writes/ https://blog.2ndquadrant.com/on-the-impact-of-full-page-writ... this is fairly detailed analysis of this issue
- virmundi 10y agoThank you. I'm reading over it now and for the next few days (to really grok it). I do wonder how bad it will be for low write situations. At the same time I'm open to switching to BigInt and using Postgresql-xl.
- Dylan16807 10y agoHow about simply using non-random UUIDs?
- qaq 10y agoThat would def. help
- graphememes 10y agoluid, check it out
- ProblemFactory 10y ago> Do I need UUIDs? Maybe not, but after much debt, I've decided that the storage requirements of such an index in memory is worth the ability to move from Postgres to Postgresql-xl. There is a major benefit to UUIDs besides server-side scaling concerns: you can generate them offline in mobile apps and other client-side applications. With serial primary keys, you are often stuck between waiting for a server round trip before saving data locally, or inventing complicated solutions for referring to not-yet-uploaded data locally.
- qaq 10y agoOk what can you write it in that you can't scale to 10K users by just adding web servers? The hard to scale part is storage layer but even crappy options like RDS will happily support 10K users.
- tbrownaw 10y agoMicrosoft Access. Works fine for something one team uses, works... not fine for something the entire corporation uses.
- devduderino 10y agoYep
- qaq 10y agoWell there are tools to help easily migrate Access to SQL Server, but this is moving fairly far from the original premise of this topic.
- Dylan16807 10y agoDoes Access actually work well for 20 users?
- nyir 10y agoAnecdotally it doesn't: had to use a time tracking program that used an Access database on a shared network folder and would frequently freeze up or crash due to locking issues (with around that many users). I imagine it could be done better though.
- Clubber 10y agoLast time I built something in Access was on Access 1997. I believe it had about 100 concurrent users and over a gig of data. Those both exceed the hard limits of access at the time so I had a single read/write database on a share and multiple read only databases on shares. I had to split tables among multiple database files as well. My direct boss was the CFO and he was cheap as hell. It's amazing the things we can come up with when we have to.
- skinp 10y agoInteresting. It might be a by-product of having worked in larger companies, but my experience has pretty much always been: Product manager > "We need this to work for 10k r/s at launch". Actual launch throughput (and all time peak): 100 r/s Now I always mostly just assume (capacity asked / 10) is more than enough!
- Nican 10y agoAs an employee of a large company, I can relate to this experience. The manager has grandiose views about the product, but has no data to back his claims.
- pbreit 10y agoUsually the opposite: business thinks it's going to get lots of users, engineers code for such, business way undershoots estimates, stuck with over-engineered app. I've never heard of a PM saying such a thing.
- emmelaich 10y agoIt's a good things to overestimate in a Big Corp, because the managers always penny pinch and will put the blame on you if things go to shit. If you're a startup, go the other way.
- romanovcode 10y agoI don't know how shitty must a system be to not able to handle 10k users with vertical scaling.
- flukus 10y agoEverywhere I've worked that tried to architect for massive scales at the beginning has ended up with an architecture that inhibits scaling. Using correct indexes and transactions can go a long way.