Hi

We are planning for Heroku Platform migration...How to estimare dynos required for the application...?

Dani AI

Generated

Short practical plan for (and thanks to for flagging dynos): focus first on measurement, then on right-sizing. A Java/Spring app needs both JVM tuning and careful concurrency planning before you pick dyno counts.

Start here — practical steps to estimate dynos:

  • Capture real or expected peak traffic (RPS), concurrent sessions, and acceptable latency. Use a staging environment to generate representative load.
  • Run one instance on a chosen dyno type and profile CPU, resident memory, GC pauses, thread pool usage and request throughput. Heroku’s docs on Dynos and Java support explain constraints to watch for.
  • Tune the JVM so heap fits comfortably inside the dyno (leave room for stacks, native memory, metaspace). A common rule is to keep Xmx below the dyno RAM so the process doesn’t get OOM-killed.
  • Load-test to find sustainable requests-per-second per dyno. Calculate required web dynos = peak RPS / RPS per dyno and add a safety margin (20–30% or more for spiky traffic).
  • Separate background work onto worker dynos and use external stores for sessions/files — Heroku’s filesystem is ephemeral, so persistent state needs a service like Redis or S3 ().
  • Automate monitoring and scale rules. Use Heroku Metrics and/or autoscaling add-ons to react to load rather than guessing (scaling guidance, metrics).

Longer-term pros and cons in brief: pros — fast deployments, managed platform, many add-ons and less ops overhead. Cons — cost rises at scale, less OS-level control, platform constraints (ephemeral files, dyno limits) and potential vendor lock-in. For a customer-facing marketing app with spiky traffic, pilot a staging load test, instrument thoroughly, and iterate on dyno type/count before full migration.

Recommended Answers

All 3 Replies

Without details about your application stack, this would be impossible to estimate. Each Heroku application is run in a dyno, which is essentially a Linux container. You really need to read the Heroku reference documentation on their web site: https://devcenter.heroku.com/articles/how-heroku-works

commented: Thank you.,..will read about it... +0

We work for Marketing Customer facing application ... Heroku is chosen as platform to migrate...application is Java & Spring based and I see its one of the supported language/platform in Heroku....As we moving to Agile methodology, we see ready to use platform will ease things...& we can just focus on the application...But what could be some advantages & disadvantages of Heroku in the long run...

Good question that I can't answer since I haven't used it. I understand that Heroku is based upon a Debian/Ubuntu distribution however. There is a lot of useful information on their web site and the documentation seems pretty thorough to me.

Disadvantages: would mostly be whether or not it will survive in the "long" term - long being relative in the Internet era.

Advantages: it was purchased by Salesforce.com in 2010, so that may be a good sign.

Go to www.heroku.com for full information.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.