3 ms·
"You should set your PC value equal to your peak TPS divided by the execution time. For example, if you have a peak of 50 TPS and your execution time is half a
by niekze 3y ago
"You should set your PC value equal to your peak TPS divided by the execution time. For example, if you have a peak of 50 TPS and your execution time is half a second, the most effective PC value would be 25."
This confused me. Wouldn't 50 / 0.5 be 100?
- deepdmistry 3y agoI did not think it that way, I understand why it is confusing. Think of it this way you have 50 invocations every second, and you take half a second to process each one. Which means at any given time, on average you will have 25 instances of your lambda running. Which means if you set your PC to 25, you pretty much guarantee that every invocation is warm. Remember that PC is nothing but total number of lambda instances that AWS keeps warm and ready to go.
- niekze 3y agoIf you had 50 invocations every second and your execution time was 2 seconds, would you set it to 100? If that's the case, you would multiply the invocations per second by the process time.
- deepdmistry 3y agoYes, maybe that’s a better way to put it