- But we do not need to worry about them. The serverless providers will manage the back end for us. - The term serverless means, you don’t have to worry about servers anymore. Focus on your code. Someone else will focus on maintaining servers and scaling your app. - Event based execution. Your code will execute only if a pre-defined event triggers it. An API call, a scheduler call or a provider specific event. - Pay only for what you use. You only pay for the execution time and the resources your function used at that time. - BaaS and FaaS: BaaS, applications which fully depend on cloud services like Firebase. FaaS, we write some server side logic.
its configuration will be stored in a storage server like S3. (It’s not executed. Just stored). - When a function is invoked, the provider will launch a container (A lightweight piece of software which includes everything that needs to run the code like system tools, compilers, system libraries, settings, etc). - Your code will be executed. - The provider will keep the container up for a small time incase it receives another call. - If no invocation happens for a certain period of time, the container will be stopped.
for a server 24/7. No need to pay for server maintenance. - Auto scaling: Scaling is just an addition for your bill. - Reduced overhead === Reduced time to market
to switch services. - Cold boot: Time it takes to run a fresh container. - Debugging is tricky. - You need to start to think differently. Disadvantages of serverless
building an app, if you use something like serverless offline to locally run the functions, don’t forget to deploy periodically and test it. - If you use webpack, note that it does take extra ram. - If you want to share variables between multiple invocations, put that code outside the handler. - They bundle your node_modules folder! Keep an eye on your libraries.