4 ms·
Here's one approach on AWS. Put http and php on an ec2 instance. Crank up as needed. 1 really big server can take quite a bit of traffic. Plan to add load bala
by petervandijck 16y ago
Here's one approach on AWS.
Put http and php on an ec2 instance. Crank up as needed. 1 really big server can take quite a bit of traffic. Plan to add load balancing too (or add it straight in). Add memcached layer to take it easy on the db.
Put mysql on an RDS server. Crank up to 68 GB of memory, 26 ECUs as needed. This will most likely be your bottleneck, but memcached should help a lot, and optimize your queries. Later on you can add slave drives and such, but one big server (and memcached) should last you a while.
Put images on a separate subdomain, on S3.
(Also, put all static files like js and css on another separate subdomain on S3.)
Instead of pre-optimizing everything to the max, just use sensible settings and install really good monitoring tools. Then, fix bottlenecks as they happen. The main thing to optimize before launching are your queries, I wouldn't worry too much about the rest, they'd just give you 10, 20% improvements etc., whereas queries can give you 1000% improvements.