I have written a simple Scala application - a few forms and a small REST API. Now I would like to move it to a production environment where it will be used by about a dozen user. What amount of RAM is recommended for running such an application? It will run on a Linux platform.
The only valid way to answer your question is to benchmark your application on a setup identical to your production setup. Any other way will either lead to over or under allocation of resources resulting in unjustified cost for the former and potential crashes for the latter.
Benchmarking properly is hard, there are countless presentations about this. For webapps, I usually reach for gatling and work with the business to create realistic estimates of traffic to simulate.
I have been able to run playframework apps with -Xmx32m (they weren't doing much and had a low traffic), my current production app runs with -Xmx1g, the previous one used -Xmx2g.
Measure, don't guess :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With