There is a very high chance that serverless is for you. If it is not, the major reasons are probably not technical, but your inner voice that is telling you to be afraid of things you are not experienced with. But as IT professionals, we are used to receiving new technologies all the time, and it is only a matter of time before serverless will be the standard way of building things.
Technical Limitations of Lambda
Lambda has quite restraining technical limitations:
- Function memory allocation: <= 3008 MB
- Function timeout: 15 minutes
- Directory storage: 512 MB
Long processing that cannot be split into chunks shorter than 15 minutes is not suitable for Lambda. If your processing needs to store a lot of data to a local disk or to load a lot of data into memory and you cannot find an alternative solution for it, then Lambda is not for you.
Cold starts are still an issue if you need a really short response time (constant <100 ms). It should be fast enough for most web-facing services, but if you are "Google", that may not be fast enough.
Constant Predictable Load on Your Servers
If you have a constant predictable load on your servers, a serverless solution could be more expensive in that case. But also take into account the operational costs, which are significantly lower when using serverless.
The development of serverless solutions are usually faster, because you do less operational work. However, it's not always faster, it depends on your problem. You must also count the time you need to optimize a serverless solution. Serverless is cheap because you only pay for resources as you need them, but if you are reckless with them, you will pay more. If you have fixed leased resources, like in the traditional system, you can be much more reckless with them.
Available Infrastructure and People
If you already have infrastructure and somebody to manage it and you already pay for it. So, why pay again with serverless.
If you have a legacy application, especially with unsupported languages, they are hard to migrate to serverless.
Calculation of Costs
It is really hard to calculate costs for serverless, but they tend to be significantly lower than in traditional architecture. On-premise datacenter servers are only 15% to 30% utilized. There are some known cases of huge (70–90%) savings with serverless solutions. According to asurvey, companies with serverless reduced their AWS monthly bill by 26%. Plus, they increased the delivery speed by 77%.
Costs of IT infrastructure for a lot of companies are a very small fraction of their IT spending. Even more savings are at operational costs. You also become more agile, you move faster, and you can concentrate on business things. These are savings that are really hard to evaluate. So, cost cuts are on all levels. Maybe your economic calculation for infrastructure turns out more expensive. But you must include all expenses and then make an informative decision. If you cannot decide, it is always easier to move from serverless infrastructure to traditional than the other way. And considering that you can develop it faster, serverless is surely the first choice.
You Can Do It Better
Do you have experts to optimize infrastructure better than Lambda? If yes, ask yourself: Are you really better, or is it your ego talking?
Vendor lock-in in serverless is not what you think. Functions (FaaS) between cloud providers are not compatible, but that is not such a problem. It is only a function and that is not hard to move compared to calls to other services that are cloud specific. Functions are only the glue between other services your cloud provider offers and they, as a whole, compose a serverless application.
That's how we come to the important question: You chose a cloud provider like AWS, which has a great history of offering a great service and a constantly reducing price, but are you planning to leave it? If the answer is yes, then vendor lock-in could be a problem. But in most cases, the answer is no and vendor lock-in presents less of a problem than comparing it to the vendor lock-in you always make when selecting your technologies (Oracle for example) and your lock-in to your operational team, which is always overloaded and understaffed. Read about vendor lock-in more here.
Being afraid of new things is also a valid reason. The main mission of business is bringing money and limiting risk. Serverless is a new technology that is changing fast. When you get on the wagon, you should act accordingly. The infrastructure, languages, libraries, services, and best practices change much faster than in older well-established technologies. IT professionals get a warm fuzzy feeling when working with new technologies, but business people do not. Instead, they care about money and risks, so that they can deliver profit to business owners and salaries to IT people.