Squeeze the hell out of the system you have
11–20 of 383 posts
Re: Squeeze the hell out of the system you have
#12Strangely obvious advice?
Re: Squeeze the hell out of the system you have
#13The bit on the database performance issues leads me to my hottest, flamiest take for new projects: - Design your application's hot path to never use joins. Storage is cheap, denormalize everything and update it all in a transaction. It's truly amazing how much faster everything is when you eliminate joins. For your ad-hoc queries you can replicate to another database for analytical purposes. On this note, I have mixe…
Re: Squeeze the hell out of the system you have
#14> We should always put off significant complexity increases as long as possible. Reminds me of the mantra that I’ve read here to easily go for reversible things and very careful when going for irreversible things.
Re: Squeeze the hell out of the system you have
#15Strangely obvious advice?
The advice is obvious when you're thinking at that level of abstraction. Which suggests that, in practice, people who are architecting such systems rarely think at that level of abstraction. Which is why it is nice to have posts like this, that periodically remind us to get our heads out of the daily minutiae and consider the bigger picture (of complexity tradeoffs, realistic projections, staffing and availability, etc.)
Re: Squeeze the hell out of the system you have
#16But the post makes it seem that there was no real query-level monitoring for the Postgres instance in place, other than perhaps the basic CPU/memory ones provided by the cloud provider. Using an ORM without this kind of monitoring is sure way to shoot yourself in the foot with n+1 queries, queries not using indexes/missing indexes etc
The other thing that is amazing that everyone immediately reached for redesigning the system without analyzing the cause of the issues. A single postgres instance can do a lot!
Re: Squeeze the hell out of the system you have
#17No mention of caching? If your database is getting hammered with SELECTs, isn't putting a cache in front of it something that should at least be considered?
If you have a dataset for which cache invalidation is easy (e.g., data that is written and never updated), yeah, absolutely go for this.
In our case, and most cases I've seen, it wasn't so simple, and "split this off to a DB better suited to it" was less complex (maybe still a lot of work, but conceptually simple) than figuring out cache invalidation.
Re: Squeeze the hell out of the system you have
#18The bit on the database performance issues leads me to my hottest, flamiest take for new projects: - Design your application's hot path to never use joins. Storage is cheap, denormalize everything and update it all in a transaction. It's truly amazing how much faster everything is when you eliminate joins. For your ad-hoc queries you can replicate to another database for analytical purposes. On this note, I have mixe…
Normalization is not only about data storage but most importantly, data integrity.
I won't say that it's trivial to update all of your business logic to do this, but I think it's definitely worth it for a new project at least.
Re: Squeeze the hell out of the system you have
#19Re: Squeeze the hell out of the system you have
#20No mention of caching? If your database is getting hammered with SELECTs, isn't putting a cache in front of it something that should at least be considered?