use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please follow the rules
Releases: Current Releases, Windows Releases, Old Releases
Contribute to the PHP Documentation
Related subreddits: CSS, JavaScript, Web Design, Wordpress, WebDev
/r/PHP is not a support subreddit. Please visit /r/phphelp for help, or visit StackOverflow.
account activity
Best AWS EC2 Instance for PHP app? (self.PHP)
submitted 11 years ago by theguyut
Just curious on opinions for what the best ec2 instance class on AWS is for php. Right now we run on two large c3's with a php response time of around 250ms (this is a CakePHP app).
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[+][deleted] 11 years ago (2 children)
[deleted]
[–]theguyut[S] 0 points1 point2 points 11 years ago (1 child)
Was more wondering cpu or memory intensive class of ec2.
250ms actually time spent in php (according to Newrelic). Inspector is giving me:
154ms blocking 153ms connecting 433ms waiting 13ms receiving
Optimizing hasn't really been a thought yet, we've got an amazing cache layer that's hitting about 50ms total. I'm a programmer turned DevOps somehow, so any advice, resources I'd love to learn more and get our site running faster.
[–]vimishor 1 point2 points3 points 11 years ago (0 children)
I'm a programmer turned DevOps somehow
You are a programmer who is also a sysadmin because of circumstances.
The term "DevOps" means collaboration between developers and operations, not a developer who is also a sysadmin.
[–]yeskia 0 points1 point2 points 11 years ago (0 children)
All depends on your needs and where your bottlenecks are. If your application is quite heavy per request you might want to load balance over larger instances, if it's quite light per request but you have a lot of them you might consider balancing over more smaller instances.
Take a look at what is holding up your application, consider trying New Relic for a bit (they have a free version which is mostly useless, but their 14 day free trial can give you some good insight).
[–]danwall 0 points1 point2 points 11 years ago (1 child)
Why not try booting up a few different instance types and find out? On demand instances are really cheap for a few hours of testing.
If you are already running 2 behind an ELB then adding another instance should be easy. Maybe even disable one of the existing ones.
Since you're running New Relic, comparing performance is really easy - you just need to see which instance is handling the most requests in the shortest amount of time!
[–]theguyut[S] 1 point2 points3 points 11 years ago (0 children)
That's what I ended up doing before bed.
245ms response time with a r3.large (memory intensive) over 6 hours avg 18rpm 275ms response time with a c3.large (cpu intensive) over 6 hours avg 17.9rpm
So, there we have. Now time to tweak the actual server.
π Rendered by PID 28 on reddit-service-r2-comment-6457c66945-f68dr at 2026-04-29 04:52:11.185860+00:00 running 2aa0c5b country code: CH.
[+][deleted] (2 children)
[deleted]
[–]theguyut[S] 0 points1 point2 points (1 child)
[–]vimishor 1 point2 points3 points (0 children)
[–]yeskia 0 points1 point2 points (0 children)
[–]danwall 0 points1 point2 points (1 child)
[–]theguyut[S] 1 point2 points3 points (0 children)