At an architectural section of an interview I was asked to produce hardware requirements for a certain system I designed. It was a microservice-based system which runs in Kubernetes, Openshift or any other virtual env.
Basically the question can be rephrased as: how much CPU, RAM and storage will every instance of microservices require to run? Why these numbers?
When I came to think of this, I realized that my knowledge is purely empirical. Normally I would deploy a service instance with 500m CPU, 500Mb RAM and a few Gb of HDD, see how many connections it can handle and, if necessary, add more resources or spawn another instance. But I have no idea how much CPU or RAM I need to handle one HTTP request or send a message to Kafka or upload a 1MB image to S3.
How can I calculate hardware requirements analytically and not empirically?