There is no technology without drawbacks, and serverless computing has some as well. Below we give a list of such drawbacks or, more correctly to say, challenges, since with the technology progress, they will be fixed in some way.
In practice, the cold start latency depends on many parameters. This includes the language in which the function is written, the number of libraries to be used, the size of the code, and the time and complexity of the access to additional resources (database, authentication server, CMS, etc.). Developers are aware of such parameters and can shorten the cold start delay by manipulating them. On the other hand, the developer cannot control the launch time of the container with the function to run, and here everything depends on the servers and virtualization software working in the data center of the serverless hosting provider.
The next disadvantage of serverless computing is the short lifetime of the function (the timeout in which the function must be executed). If you have to work with long-lived tasks, you can use a hybrid architecture which combines serverless applications with virtual machines or dedicated server technology.
How can this work? For ecommerce, it is possible to use serverless computing as a load balancer. Let's say there is an online store that has visits from 50 users per hour. A low-end virtual machine with suitable hardware characteristics can be sufficient for this load. From time to time, though, the load on the store increases significantly. Then the virtual machine will be overloaded and can deny access to the store.
In such a situation, we can optimize the system through a hybrid approach: we leave one virtual machine behind the load balancer and put a link to a serverless endpoint with functions. If the load exceeds the threshold, the balancer launches instances of serverless functions that take over part of the request processing.
Thus, serverless computing can be used when, not too often, you intensively process a large number of requests. In such a case, running serverless functions is more profitable for a short time than constantly keeping and paying for a powerful virtual machine or server all the time.