简体   繁体   中英

Which InstanceType for rails elastic beanstalk development vs. production?

We want to run both development and production instances on elastic beanstalk for our rails app.

Characteristics of production are:

  • Low traffic
  • Mostly CRUD
  • Desire responsive pages (commercial endeavor, not hobby)

Database requirements (none on eb instance):

  • Will use a multi-schema RDS instance
  • development currently uses sqlite on eb instance
  • Will perhaps use the same RDS instance for both development and production

Our development is currently a t1.micro , and clearly that isn't going to cut it even for development (login sometimes takes 60 seconds).

I will experiment, but would appreciate if anyone has any quick bits of advice for choosing an appropriate instance type for each env and which criteria/constraints are most meaningful for rails ie compute units.

My 2 cents - lean on the side of CPU over memory. CPU always helps; at the very least your app will compile assets and load into memory faster on deploys. I suggest starting with 2x c1.medium in production (in 2 different AZs for basic redundancy) and 1x m1.small in development.

Don't overthink the machine sizes, instead get the low hanging fruit right, namely: put your static assets on a CDN and implement fragment caching (stored in a dedicated redis or memcached node per environment).

If you've never done this before, New Relic Pro will likely give you a big head start identifying bottlenecks in your app.

Then get to load testing!

Also, please don't share your RDS instance between production and development. Isolate the two environments by giving each their own database.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM