<h3>What is serverless architecture?</h3><p>Serverless architecture is one of XaaS cloud solution but pursuing efficient data usage. It's also called as FaaS (Function as a Service), and eliminates server software and hardware management by developer/startups.</p><p>In order for start up to host a software application in the web, it usually requires to manage some kind of server infrastructure and its algorithms. Typically this means that either virtural or physical server computing needs to be managed by them, as well as operating system and others which requires for a web server for their web application. Using cloud server platform like AWS, Azure, and GCP eliminates needs to manage physical server, but this still requires some level of management of the infrastructure at the cloud. Meanwhile, serverless concept relies cloud more, but developer/startups can focus more on what's really need for their apps(ie this is called 'Function') in return.</p><p>If they needs certain things, they just focus on functions and creating its script, then serverless arthicture in the cloud takes care of all the physical hardware, operating system, and other web server related software which needs to communicate back to developer/startups. Per explanation from <a href="https://www.twilio.com/docs/glossary/what-is-serverless-architecture" target="_blank">twilio</a>,</p><blockquote><span style="color: rgb(35, 54, 89); font-family: "Whitney SSm A", "Whitney SSm B", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 15px;">With FaaS, you compose your application into individual, autonomous functions. Each function is hosted by the FaaS provider and can be scaled automatically as function call frequency increases or decreases. This turns out to be a very cost effective way of paying for compute resources.<br>You only pay for the times that your functions get called, rather than paying to have your application always on and waiting for requests on so many different instances.</span><br></blockquote><p><br></p><p>Per <a href="https://www.fullstackfirebase.com/introduction/what-is-serverless" target="_blank">fullstackfirebase</a>,</p><blockquote><p class="blockParagraph-544a408c" data-key="be21fdc856834ab6b3696a18152e2ebf"><span class="text-4505230f--TextH400-3033861f--textContentFamily-49a318e1">Most "serverless" web apps use a combination of technologies. These technologies include</span></p><ul class="list-20526648" data-key="e9bcdf3dbe4c497ea1b04c6d2ef95dbd" data-slate-fragment="JTdCJTIyb2JqZWN0JTIyJTNBJTIyZG9jdW1lbnQlMjIlMkMlMjJkYXRhJTIyJTNBJTdCJTdEJTJDJTIybm9kZXMlMjIlM0ElNUIlN0IlMjJvYmplY3QlMjIlM0ElMjJibG9jayUyMiUyQyUyMnR5cGUlMjIlM0ElMjJwYXJhZ3JhcGglM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0ElMjJhJTIwZnVuY3Rpb25zLWFzLWEtc2VydmljZSUyMHByb3ZpZGVyJTIwdGhhdCUyMHJ1bnMlMjBzZWN1cmUlMjBmdW5jdGlvbnMlMjBvbiUyMGElMjBzZXJ2ZXIuJTIyJTJDJTIybWFya3MlMjIlM0ElNUIlNUQlN0QlNUQlN0QlNUQlN0QlNUQlN0QlNUQlN0QlNUQlN0Q="><li class=""><div data-key="f7bc993bcae1403cb269fdf6ca800656" class="reset-3c756112--listItemContent-756c9114"><p class="blockParagraph-544a408c--noMargin-acdf7afa" data-key="4918ce7e218041f2b58c41894bc935d2"><span class="text-4505230f--TextH400-3033861f--textContentFamily-49a318e1">single-page applications (SPAs) written in JavaScript that provide the graphical user-interface to your users,</span></p></div></li><li class=""><div data-key="5ae9c31da3364bee98ccf6ee6a3cd13a" class="reset-3c756112--listItemContent-756c9114"><p class="blockParagraph-544a408c--noMargin-acdf7afa" data-key="457bd6e64d8b458290f4e8b443149877"><span class="text-4505230f--TextH400-3033861f--textContentFamily-49a318e1">a static file host to serve the JavaScript, CSS and HTML files necessary for the SPA,</span></p></div></li><li class=""><div data-key="536fb77187a940cf8ab0e862e8223302" class="reset-3c756112--listItemContent-756c9114"><p class="blockParagraph-544a408c--noMargin-acdf7afa" data-key="707ee94bb4f846b5b7e1d218f64bf7c2"><span class="text-4505230f--TextH400-3033861f--textContentFamily-49a318e1">a cloud-based database that the SPA connects to directly, and finally,</span></p></div></li><li class=""><div data-key="e1269aa1be8340b8858e0e5cd2aeb75f" class="reset-3c756112--listItemContent-756c9114"><p class="blockParagraph-544a408c--noMargin-acdf7afa" data-key="28aa0cf9e88746f193e8c685b6d412d2"><span class="text-4505230f--TextH400-3033861f--textContentFamily-49a318e1">a functions-as-a-service provider that runs secure functions on a server.</span></p></div></li></ul></blockquote><p><br></p><h3>A bit history on serverless concepts and other types of backend architectures</h3><h4>Monolith</h4><p>Concept of monolith is that integrating entire backend infrastructure/algorithm into single place, which resulted in heavy system hence time consuming ended up being difficult to scale by developer's themselves.</p><p><br></p><h4>Microservices</h4><p>By contrast, microservices split backend infrastructure into function module, such as authentication, payment, emails, inventory, etc. This would be next steps once a developer or their company over run to spend time to manage everything for server side system. Microservices uses HTTP(typically API) to connect each services.</p><p><br></p><h4>Functions</h4><p>Instead of running all the time like monolith and microservices, functions concept only executes in a seconds when there is a need hence scripting function by developers. So this is event based architecture.</p><p><br></p><h3>Benefits to utilize</h3><ol><li>Cost Efficient : pay as you go for an operation called by the function</li><li>Time Efficient : more simple code more focus on product application itself and UI/UX. They take care of backend infrastructure and systems which functions require</li><li>Scalability : They take care of scaling, you don't have to worry about backend scalability</li></ol><p><br></p><h3>Risks?</h3><p>One of a concern we might have for serverless like using Google Firebase or AWS Lambda is that we do put API at front end script and is exposed, hence they would be wondering how FaaS restrict users to modify data? If we focus on firebase to clarify these question, firebase has a console at their web page and we can put backend data management rules there by each web application project. For an example, like <a href="https://stackoverflow.com/questions/35418143/how-to-restrict-firebase-data-modification" target="_blank">they talked in stackoverflow</a>, if we are concerned about phishing attack risk, there is a way to restrict on access by HTTP referrer by creating a script in google console.</p><p><br></p><p>References;</p><ul><li><a href="https://www.fullstackfirebase.com/introduction/why-firebase" target="_blank">Fullstack Firebase</a></li><li><a href="https://www.twilio.com/docs/glossary/what-is-serverless-architecture" target="_blank">Twillo Docs (Serverless Architecture)</a></li><li><a href="https://brainhub.eu/blog/cloud-architecture-saas-faas-xaas/" target="_blank">Brainhub (Cloud XaaS definitions)</a><br><br><br></li></ul>
<< Back to Blog Posts
Back to Home