This depends on what your application is doing. If you are going to solve a very expensive computation that takes 5 minutes and 10 GB of memory for each request, then you are going to need a lot of memory and compute for even a very small RPS. On the other hand, if you don't do very much per request, the situation is very different.
Also, ram = 2*cpu number doesn't make any sense.
And no, Rust is not safe from stack overflows. And what do you mean by storing it on the stack? Having a local String variable wont store it on the stack, so how do you intend to do it? And what do you mean by medium size?
thanks, yes i know, my means for each request
with params, we decision response with json (like bellow)
and after responsed, it drop from heap,
and our computation dont use any awaiting code to let other task run,
because itself very fast decision and response a json then,
other part of calculation very low size data
like 3 enum,
serde_json::to_string(r#"
{
"rep": "۱۲-۶",
"set": "۳",
"intensity": "۶۰−۸۰٪"
"rest_interval": "۲-۵ ثانیه",
"execution" : "از شروع حرکت تا تحت فشار قرار گرفتن ماهیچه ۲ ثانیه طول بکشد ـ یک وقفه ـ ۴ ثانیه تا حالت ابتدایی طول بکشد ـ یک وقفه ـتکرار"
"explain": "پس از انجام هر ست وزنه را بیشتر و تعداد را کمتر کنید ـ حد فشار باید بین ۶۰−۸۰٪ باشد",
"upper": [
"shoulder_press.jpg",
"bent_over_row.png",
"standing_dumbbell_curl.png",
"triceps_dip.png",
"pushup.gif",
"russian_twist.jpg"
],
"lower": [
"back_squat.png",
"leg_press_machine.png",
"hack_squat.jpg",
"calf_raise_machine.jpg",
"hamstring_curl.jpeg",
"hyperextension.jpg"
]
}"#).unwrap()