9 comments

[ 2.9 ms ] story [ 35.6 ms ] thread
(comment deleted)
Pretty quiet here. :) Let us know if you have any questions or comments. This was a pretty big project and I think we're the largest deployment of ProxySQL right now!
This was a fantastic post and might save me a lot of headaches in the near future. Thanks for sharing what you learned!
Really enjoyed your post. I had a question about your usage of ProxySQL.

1) Do you have to update the ProxySQL configuration on your application servers when you do a slave promotion or is that handled automatically?

2) I didn't fully understand how you know which database host has a shard (i.e. shard 22). Is that also part of your ProxySQL configuration?

1) We actually keep the "state" for slave/master in EC2 tags, which are changed via a different mechanism.

2) There's a different configuration for mapping which database hosts exist on which shard. Our system currently has multiple database shards per machine, and that's stored in a configuration that our automation will update when new machines/shards go into production.

I am the author of ProxySQL, and I am very glad it helped a wonderful service like Nylas to easily scale the database infrastructure. I will be happy to answer any question on ProxySQL.
I love these kind of articles. But I think it's a bit weird that most devs choose to horizontally scale at the data persistence layer, instead of the application layer. And that they choose a SQL database to basically store just text blobs.

As this is a mail app, and users doesn't need to read each others private messages. I would put say 100 users per (virtual) server and also store the data there. And have a simple traffic router.