Serverless Days 2023

On October 21, 2023, Serverless Days took place — the world's largest Serverless event, which this time was held in São Paulo.
I had the opportunity to participate in the panel where the topic was: "Serverless - When to use and when not to use." I shared some learnings and cases from Base39.
It was an incredible event; we had people from various parts of the country and even people from abroad.
We had a lot of knowledge and experience exchange — it was certainly an event that added a great deal of knowledge for all participants.
With that, I would like to share a bit of my experience and what was discussed in the panel.

What types of projects are especially suited to opting for serverless from a technical solution standpoint?
Serverless architecture is especially suited for projects that have the following requirements:
- Variable workload: projects that experience unpredictable traffic spikes or fluctuations in demand are good candidates for serverless.
- Asynchronous business logic: projects that run asynchronous business logic, such as event processing or back-end services, can benefit from the automatic scalability and reduced operational costs of serverless.
- Stateless coding: projects that use stateless code, meaning they do not depend on persistent state, are easier to implement and manage in a serverless environment.
- Variable cost: projects with variable workloads can benefit from variable costs, paying only for what they use.
- Operational cost: projects with high operational costs can benefit from the reduced operational costs of serverless.
Some examples of projects that can benefit from serverless architecture include:
- Websites and mobile apps: projects that experience traffic spikes during the day or at special events can use serverless to scale automatically without the need to provision or manage servers.
- Streaming services: video and music streaming services can use serverless to transcode content in real time, as needed.
- Artificial intelligence and machine learning applications: applications that run intensive processing tasks, such as image analysis or natural language processing, can use serverless to scale efficiently without the need to purchase or manage dedicated servers.
Are there scenarios or types of projects where you consider serverless architecture would not be the best choice? Could you share some examples?
Serverless architecture is not a universal solution and may not be the best choice for all projects. In general, projects that have the following requirements should avoid serverless:
- Constant workload: projects that experience constant resource demand may be more economical when run on dedicated servers.
- Synchronous business logic: projects that run synchronous business logic, such as real-time transaction processing, may not be suitable for the automatic scalability of serverless.
- Stateful coding: projects that use stateful code, meaning they depend on persistent state, can be more complex to implement and manage in a serverless environment.
What were the main benefits observed when adopting serverless architecture in your company's projects? Can you share any success story?
- Automatic scalability: serverless architecture allows processing capacity to be scaled automatically according to demand. This can help reduce operational costs and improve user experience.
- Reduction of operational costs: serverless architecture can help reduce operational costs, as it eliminates the need to provision and manage servers.
- Agility: serverless architecture can help increase agility, as it allows developers to focus on business logic rather than infrastructure.
- Faster time to launch: serverless architecture can help reduce launch time, as it allows developers to focus on business logic rather than infrastructure.
- Greater availability: serverless architecture can help increase availability, as it allows developers to focus on business logic rather than infrastructure.
- Greater security: serverless architecture can help increase security, as it allows developers to focus on business logic rather than infrastructure.
Are there project type characteristics that, from a cost standpoint, make more sense to be serverless? And which situations does this not make sense?
- Variable workload: projects that experience unpredictable traffic spikes or demand fluctuations can save costs by using serverless automatic scalability.
- Asynchronous business logic: projects that run asynchronous business logic can save costs by using the reduced operational costs of serverless.
- Stateless coding: projects that use stateless code can save costs by using the management simplicity of serverless.
How do you usually make TCO cost comparisons of opting for serverless or not?
TCO comparisons involve analysis of operational, infrastructure, and personnel costs between a serverless and a traditional architecture. The reduction of operational and maintenance costs is usually the main factor in favor of serverless.
- Infrastructure costs: infrastructure costs include the cost of purchasing or renting servers, hardware and software, and maintenance.
- Operational costs: operational costs include the cost of energy, cooling, personnel, and security.
- Development costs: development costs include the cost of hiring developers, training, and development tools.
To make an accurate TCO comparison, it is important to consider all these factors and estimate their values accurately. In general, serverless architecture can be more economical than traditional architecture in scenarios with variable workloads, as it allows scaling processing capacity according to demand, avoiding provisioning idle servers.
Here are some examples of how infrastructure and operational costs can vary between serverless and traditional architectures:
-
Infrastructure costs: in a traditional architecture, infrastructure costs can be significant, especially for high-demand workloads. For example, a company hosting a high-traffic website may need to purchase or rent dedicated servers to ensure the necessary performance and availability. In a serverless architecture, the infrastructure is managed by the cloud provider, which can significantly reduce costs.
-
Operational costs: operational costs can also vary between serverless and traditional architectures. In a traditional architecture, operational costs can include the cost of energy, cooling, and personnel. For example, a company hosting an application on a dedicated server may need to hire a systems administrator to manage the server. In a serverless architecture, these costs are generally covered by the cloud provider.

Which scenarios make more sense to opt for fixed cost and when to opt for variable cost?
Fixed cost makes sense for predictable workloads, while variable cost is more appropriate for scenarios with fluctuating demand. The choice between fixed cost and variable cost depends on a series of factors, including company needs, workload profile, and budget.
Fixed cost is a more suitable option for companies that need a constant processing capacity, such as companies that host websites or applications with constant traffic. Fixed cost is generally higher than variable cost, but offers the advantage of predictability.
Variable cost is a more suitable option for companies that need variable processing capacity, such as companies that host applications with traffic spikes or companies that run intensive processing tasks. Variable cost is generally lower than fixed cost, but offers the advantage of scalability.
Here are some examples of scenarios where fixed cost may be a more suitable option:
- Companies that host websites or applications with constant traffic
- Companies that need high availability for their applications
- Companies with limited budget
Here are some examples of scenarios where variable cost may be a more suitable option:
- Companies that host websites or applications with traffic spikes
- Companies that run intensive processing tasks
- Companies with unlimited budget
Which scenarios make more sense to opt for Edge Serverless vs Cloud Serverless?
The choice between Edge Serverless and Cloud Serverless depends on a series of factors, including user location, the need for low latency, and budget.
Edge Serverless is a more suitable option for companies that need to provide services close to users, such as CDNs or mobile applications. Edge Serverless offers low latency, as resources run on servers near users.
Cloud Serverless is a more suitable option for companies that need to provide services across the Internet, such as web applications or back-end applications. Cloud Serverless offers scalability and availability, as resources run on servers managed by the cloud provider.
Here are some examples of scenarios where Edge Serverless may be a more suitable option:
- Companies that need to provide services close to users
- Companies that need low latency for their applications
- Companies with limited budget
- Companies that provide CDNs or mobile applications
Here are some examples of scenarios where Cloud Serverless may be a more suitable option:
- Companies that need to provide services across the Internet
- Companies that need scalability and availability for their applications
- Companies with unlimited budget
- Companies that provide web applications or back-end applications
What needs to be taken care of when opting for serverless? Could you share any challenges or obstacles you encountered when implementing serverless solutions? How to overcome these challenges?
- Workload: Serverless architecture is better suited for intermittent or variable workloads. In constant or predictable workloads, serverless architecture may be more expensive than a traditional architecture.
- Performance: The performance of a serverless application can vary depending on the platform and code optimization. It is important to perform performance tests to ensure that the application meets user expectations.
- Security: Security must be treated with attention in any IT architecture. In serverless environments, it is important to implement appropriate access policies, continuous monitoring, and identity management.
Some specific challenges that may be faced when implementing serverless solutions include:
- Dependency management: In a serverless architecture, dependencies are managed by the cloud provider. It is important to understand how dependencies are managed and how this can affect the code.
- Latency: Latency can be an important factor in applications that require fast responses. It is important to consider the location of users and serverless resources when designing the application.
- Monitoring: Monitoring is essential to ensure the performance and availability of the application. It is important to choose the right monitoring tools for the application's needs.
To overcome these challenges, it is important to adopt good development practices and use appropriate tools. Some specific tips include:
- Use a serverless framework: A serverless framework can help simplify the development and management of serverless applications.
- Use monitoring tools: Monitoring tools can help identify and resolve performance and availability issues.
- Use good development practices: Good development practices, such as using automated testing, can help reduce the risk of errors and problems.
In which scenarios did serverless architecture prove superior when compared to traditional server-based architectures?
Serverless architecture stands out in projects with intermittent workloads, enabling efficient scalability without the need for constant server provisioning.
- Intermittent workload: In intermittent workloads, serverless architecture can scale efficiently without the need to provision idle servers.
- Variable workload: In variable workloads, serverless architecture can handle demand fluctuations without the need for manual intervention.
- Intensive processing workload: In intensive processing workloads, serverless architecture can scale to meet performance needs without the need to invest in IT infrastructure.
How did serverless architecture meet the performance and scalability demands of your projects?
Serverless handles automatic scalability well, but performance can vary according to the platform and code optimization.
In our projects, serverless architecture met performance and scalability demands satisfactorily. In general, application performance was good, with acceptable latencies. Scalability was also good, with the ability to handle traffic demands without issues.
To ensure performance and scalability, we adopted the following measures:
- Use of a serverless framework: The serverless framework we use provides resources and tools to optimize application performance and scalability.
- Code optimization: The application code was optimized for performance and scalability.
- Use of monitoring tools: Monitoring tools were used to identify and resolve performance and scalability issues.
How is security managed in a serverless environment at your companies? Are there any specific challenges you faced in this regard?
Security is managed in our serverless environments according to security best practices. The main measures adopted include:
- Use of appropriate access policies: Access policies are used to control who can access serverless resources.
- Continuous monitoring: Continuous monitoring is used to identify and resolve security issues.
- Identity management: Identity management is used to ensure that only authorized users have access to serverless resources.
A specific challenge we faced was the need to understand how access policies are managed by the cloud provider. It is important to understand the limitations of access policies to ensure that the application is secure.
What were the main learnings you obtained when exploring serverless architecture in your projects?
The main lesson is that serverless is not a universal solution, but can bring significant benefits in appropriate scenarios. The importance of monitoring and dependency management is crucial.
How do you see the future of serverless architecture at your companies? Are there plans to expand or modify the use of this technology in upcoming projects?
We believe the future of serverless architecture is promising. The technology is evolving rapidly and offers a range of benefits that can be attractive to companies of all sizes.
At the moment, we are planning to expand the use of serverless in our projects. We believe the technology can help us reduce operational costs, increase agility, and improve user experience.
Some specific changes we are considering include:
- Using more managed serverless services: Managed serverless services offer a range of benefits, such as simplified development and management, and reduced operational costs.
- Investing in monitoring and dependency management tools: Monitoring and dependency management are essential to ensure the performance and availability of the serverless application.
We are confident that serverless architecture can help us achieve our business goals.
See you next time!

