During my work, I often evaluate costs and performance, but the real challenge is not finding the best compromise between performance and budget, because after careful analysis, the best balance is always achieved. Continuously adapting this balance to unpredictability is the most complex and delicate phase of any project, and this is the true challenge.
I have often needed to design distributed and balanced systems in the cloud. The number of available services and tools is vast, but by documenting oneself properly and reading a few articles, it is possible to navigate even unknown territories.
There is never a precise answer or the perfect infrastructure that fully satisfies cost/performance requirements. In this case, other factors must be monitored, such as the maintenance cost or the time required to scale resources according to the workload.
Let’s take some services available on AWS as an example. In the case of a serverless architecture based on Lambda Functions, Events (EventBridge/SQS), and Managed Storage (DynamoDB), the maintenance cost of the infrastructure is minimized because they are all managed services by AWS. With this configuration, any issues related to performance or resource shortages are instantly resolved by the automatic scaling system of the AWS managed services. The more requests there are, the greater the number of events in the queue, which are progressively consumed by one or more Lambda Functions. Additionally, each service can be configured to absorb potential load spikes. However, by keeping an eye on costs, we can also limit the resources that the service can allocate during the adaptation phase.
Especially during the early stages of a newly released project, improvements will almost certainly be made. Ongoing adjustments post-release are essential when using a serverless approach. The advantage of this configuration is having full control of the budget by setting up resources so they can “grow” up to a predetermined threshold. This methodology is extremely successful in optimizing costs despite the unpredictability of the environment. Allocating a potentially extra-large resource but using only a tenth of it and being billed only for what has actually been used is the most efficient response to unpredictability.
At this point, the question is: which services should be used to achieve an optimal balance between costs, performance and unpredictability?
There is no single answer, precisely because each cloud service (AWS, Azure, GCP, etc.) is highly configurable and it’s always possible to reach a balance. What needs to be considered are the maintenance costs, the extent to which each process can be automated, and a forward-looking assessment to determine if the maximum resource limits will remain cost-effective if they need to be updated. The choice of a service should take into account at least these key points.
In conclusion, any service can be a good choice. What makes the difference are other factors that take into account the specific needs and constraints of the project, such as maintenance costs, the degree of automation, and future scalability.