On Oct 8, 2014, at 2:51 PM, Hassan S.
[email protected] wrote:
Heroku offers PostgreSQL only, so you might want to switch over
in development to avoid any incompatibilities.
That’s not entirely true, Heroku offers an addon through ClearDB for
MySQL. Also you can use Heroku with an Amazon RDS instance too
(obviously additional setup required)
Since scale is an issue, you might want to test postgres & mysql itself
for the specific operations you are doing (at scale), then choose the
database based on the results of that test.
How can I address this amount of inserts per second into the database?
This seems like a perfect example of premature optimization
If you’re really concerned, set up a test app on Heroku and fire up
jmeter or ab or something and see exactly how it performs. You may
find you have nothing to worry about.
Yes, I agree, although if it actually is thousands of web requests per
second it will require more than 1 dyno, or a larger Heroku dyno (like
the Performance dynos), and it certainly will hit some bottlenecks at
some point.
I wouldn’t agree that thinking about how an app is going to scale (and
how to architect it so that it will scale) is necessarily premature
optimization, although over-architecting for scale before load testing
to determine where the bottlenecks are certainly could lead to premature
optimization (particularly, optimizing things that don’t need to be
optimized). I think the point is, make sure you can’t disprove the
hypothesis, “If I optimize X, I will see performance gain Y” for any
specific part of the stack you might optimize. If you can’t disprove
(and of course you must actually try to disprove) that hypothesis, it is
reasonable to conclude you have identified the bottlenecks and can
justify spending time on optimizing that area of the stack.
Since no one else mentioned it, I would add you will use New Relic
significantly here. You will need to get the New Relic “plus” or
“premium” plan, so you can drill down into the requests to see where the
bottlenecks are.
By “ab” do you mean “Apache Bench”?
I think both those tools will generate request from the programmer’s
connection. One thing I like about blitz is that it can hit your website
with thousands of concurrent requests from different data centers across
the planet, so you can see how it performs different depending on
geographic region.
-Jason
Jason Fleetwood-Boldt
[email protected]
All material Jason Fleetwood-Boldt 2014. Public conversations may be
turned into blog posts (original poster information will be made
anonymous). Email [email protected] with questions/concerns about
this.