Serverless Applications on Cloud The Hype Vs Reality

Serverless Applications On Cloud The Hype Vs Reality-PDF Download

  • Date:01 Jul 2020
  • Views:2
  • Downloads:0
  • Pages:11
  • Size:519.21 KB

Share Pdf : Serverless Applications On Cloud The Hype Vs Reality

Download and Preview : Serverless Applications On Cloud The Hype Vs Reality

Report CopyRight/DMCA Form For : Serverless Applications On Cloud The Hype Vs Reality


Author Krishna Kumar Gopinathan is an Architect in the Cloud Centre Of. Excellence at UST Global An Enterprise Architect his focus is primarily inclined. towards the design and development of cloud native applications and migration of. large legacy applications to public cloud platforms He is an AWS Certi ed Archi. tect Professional as well as an AWS DevOps Certi ed Professional He is passion. ate about everything related to cloud with prime emphasis on Cloud Security. The massive adoption of cloud technology in this digital economic era has paved the way for organizations to migrate. from a CAPEX to an OPEX model with respect to their IT spend And now organizations are seeking to bring in optimi. zations in their use of cloud resources The advent of Serverless architectures have enabled CIOs to achieve optimi. zations in compute consumption on cloud Nowadays Serverless architectures are gaining acceptance among CIOs. and architects as it serves as a means to not only optimize compute consumption on cloud but also as a preferred. method to migrate applications to cloud, Interestingly Serverless an out of the box terminology does not extract a No Server interpretation The cloud. provider shoulders the responsibility of server management enabling an ephemeral compute service that executes. a piece of code on demand triggered by requests and events The consumer is charged only for the duration of. execution of the code, In application architecture parlance the term Serverless is often used interchangeably with Function as a Ser. vice or FaaS FaaS has brought in a radical change in our understanding on application architecture and the method. ologies adopted in designing the integration of various application components The key is to visualize systems as a. succession of events that forms the basis for a response or an entirely new set of events For instance when a user. clicks on a web page or while a database undergoes an updation process it could trigger a set of functions based on. these events Furthermore systems can be considered as State machines wherein state changes trigger events. which in turn trigger functions, The Three Giants amongst the existing cloud vendors Amazon Google and Microsoft have made heavy invest. ments in Serverless or FaaS While Amazon s service is called AWS Lambda launched in 2014 the services of Micro. soft and Google are called Azure Functions launched in 2015 and Google Functions launched in 2016 alpha. release respectively Similarly IBM has released its Serverless service called OpenWhisk The CIO Magazine. published by IDG lists Serverless as one of the key enterprise cloud strategy trends for 2019. This whitepaper outlines meaningful insights on the traits encompassing Serverless that throws light on design. approaches to Serverless applications and cites the imperative security concerns involving Serverless applications. 2 Serverless In a Nutshell, Martin Fowler de nes Serverless as Serverless architectures are application designs that incorporate third party. Backend as a Service BaaS services and or that include custom code run in managed ephemeral containers on a. Functions as a Service FaaS platform This can be better explored and comprehended by taking into account a. traditional three tier web application illustrated below. Client Browser Server Database, Contextualizing this architectural layout the client can be found to be relatively ignorant regarding the cardinal.
functionalities involving the system such as authentication page navigation searching etc In the Serverless. paradigm the above architecture may end up as depicted below. Copyright 2019 UST Global Inc UST Global Cloud Center of Excellence Serverless Architectures 2. Purchase Function Purchase Database,Client Browser API Gateway. Search Function Product Database, As an alternative measure to running servers on a 24 7 basis the above architecture implements Serverless functions. that responds to events generated from the API Gateway against the Http requests received from the client applica. The breaking up of various logical requirements into distinct deployed components is found to be a widespread. approach In the original version the entire ow control and security is managed by the central server application. whereas in the Serverless version there is no central arbiter entailing these concerns In fact it is evident that chore. ography is preferred over orchestration as each component plays a more architecturally conscious role a notion. extensively conceived and adopted in microservice approaches as well. 3 Key Characteristics of FaaS, This section enables a thorough understanding of speci c traits pertaining to Serverless applications which play. an increasingly essential and concrete role while designing these applications. Functions are developer written code deployed in ephemeral compute containers which are managed by the cloud. Containerized provider Eg AWS Lambda Azure Functions. Multi language FaaS functions eliminate the need for a speci c framework or library Eg AWS Lambda FaaS Service from AWS. can be written in Node JS Python Java Go Net etc, There is no central server to manage ow control and security A FaaS system comprises of independent. No servers to, functions wherein each function might re ect a speci c functionality of the overall system.
manage etc, The deployment varies from traditional systems Developer s responsibility is limited to uploading the code of the. function to the FaaS provider The service provider is responsible for provisioning resources instantiating VMs. deployments managing processes etc, Scalability of the FaaS functions is the responsibility of the provider FaaS functions run in ephemeral compute. Platform managed, containers and the provider creates and destroys them purely based on runtime need All underlying resource. Scalability provisioning and allocation is handled by the vendor. FaaS functions are naturally stateless If any FaaS function requires persistent state then that state needs to be. Statelessness externalized outside the FaaS function instance. Designed for FaaS functions are limited to how long an invocation can run This implies that long lived tasks are not suited to. FaaS functions without re architecture,short lived tasks. FaaS functions can have startup latency which can vary signi cantly anywhere from a few milliseconds to a few. Prone to startup seconds depending on a plethora of factors Though disconcerting there are workarounds but any application. latency designed using FaaS should be tested on production like workloads. Copyright 2019 UST Global Inc UST Global Cloud Center of Excellence Serverless Architectures 3. 4 Common Architecture Approaches using FaaS, A cohesive strategy needs to be adopted right from the start to embark upon a Serverless path The Serverless.
paradigm needs to be approached keeping a tab on the below cited aspects. Decompose the application into stateless single purpose functions Stateless functions. are in nitely scalable and easy to test, Decouple back end logic from front end applications Building core business logic into. the back end allows the front end to focus exclusively on interaction This integrates. security advantages as well, Incorporate security at every layer Good fences make good neighbors Ensure that. each and every layer is doing input validation authentication authorization veri cation. Serverless does not imply magic Establish clear visibility into every layer Hence each. layer must be actively monitored, Serverless functions implemented on public cloud platforms heavily rely upon the event framework of various cloud. native services cloud managed API Gateway endpoints and third party services which provide layers of functionali. ty Some of the common application architecture use cases using FaaS are. 4 1 Functions as Glue, In this approach functions are used to connect or stitch together glue discreet services to form complex pipelines. The event framework of the services is responsible to trigger functions which in turn perform actions such as process. the data or call other services in the pipeline,File Upload to S3.
S3 Event Trigger Upload Data,S3 Buket AWS Lamda AWS DynamoDB. In the above illustration AWS S3 triggers a Lambda function on le upload to save data to AWS DynamoDB. 4 2 Single Service Single Function, In this scenario an API Gateway is used to route all requests for a service to a single function The function splits. logic based on the action to be performed This can be considered as a Serverless monolithic function or in some. cases as an anti pattern This can only be used while working on very small projects or single use case function. books create,http request books search,books Delete. books Update,API Gateway FaaS Function Books Db, Copyright 2019 UST Global Inc UST Global Cloud Center of Excellence Serverless Architectures 4. In the above cited illustration the API Gateway will route all requests for a speci c service to a single function The. function will split logic based on the action one needs to perform The action to be performed can be obtained either. from the Http method the payload or even from the URL route. This approach attracts fewer number of les and stands a high chance of warm invocation. The approach lacks close monitoring of individual actions and in the event of an error in the function it causes the. whole service to go down,4 3 Single Service Multiple Functions.
In this architecture the API Gateway endpoint calls multiple functions based on the path or the method Each function. is based on an action and enables an event driven approach In this way the client is required to know about a single. API endpoint instead of managing all the API endpoints per function This is typically used for small to medium sized. c FaaS Function,http request,FaaS Function,API Gateway Books Db. ks FaaS Function,FaaS Function, In this example all requests books services are routed to a single API Gateway which in turn calls for an appropriate. function Each function can be scaled independently and managed separately Each function will also have di erent. levels of access to the database depending on the functionality. The key bene ts of this approach enable to log monitor and test functions with added ease and e ectiveness In case. of an error in one of the functions the overall service remains una ected Further each function scales independently. achieving cloud cost optimizations and since each function is a discrete unit of application functionality it can be. easily integrated into work ows, A major drawback associated with this approach involves ample number of functions to be managed. 4 4 Microservices, In this approach each microservice has its own API Gateway functions and resources Fronting this is another API. Gateway that routes requests to the di erent microservices based on path In this manner the client needs to know. a single API alone but the addition of new APIs signify that the main API necessitates updation with another path to. the microservices API endpoint Each of these microservices can be operated and deployed on their own This. approach is typically used for designing large applications with varied functionalities and serves as a comprehensive. approach for migrating or re architecting legacy applications to cloud. Copyright 2019 UST Global Inc UST Global Cloud Center of Excellence Serverless Architectures 5. API Gateway Function,request author,API Gateway Function.
API Gateway Main Function p,API Gateway Function, In the above cited example the book the author and the publisher services are equipped with their own gateways. and set of functions Fronting this is another API Gateway that routes requests to di erent services based on the path. Hence the client knows a single API endpoint, This architecture scales extensively well enabling development of each microservice independently Besides. enabling ease of access to manage the concerns are e ortlessly separated as well. The core drawback involves the main function to be the single point of failure Furthermore service discovery is. manual at this point in time Apart from this inclusion or exclusion of a service implies that the main function requires. a manual updating process,4 5 Backend Less, In this approach most of the application logic is hosted on the front end client These applications are registered with. the back end and uses a key for communication authentication authorization. A BaaS is designed to provide an explicit range of services that includes authentication messaging remote con gu. ration and databases,Authentication Service,API Gateway FaaS Function Db As a Service. Copyright 2019 UST Global Inc UST Global Cloud Center of Excellence Serverless Architectures 6. 4 6 Streaming Pipelines, There are no speci c architectures designed in place for streaming data It stands use case dependent Some of the.
common use cases are auditing archival noti cations messaging and real time analytics AWS Kinesis Streams. Firehose Azure Stream Analytics and Google Cloud Platform GCP Cloud Data ow provide event based integrations. to FaaS on the respective platforms,4 7 Functions at Edge. This model allows functions to run as close as possible to the user by utilizing a CDN point of presence. 5 Merits and Demerits,1 Improved Utilization, Serverless changes the economic model of cloud computing anticipating e ciency and cost savings as core. ologies adopted in designing the integration of various application components The key is to visualize systems as a succession of events that forms the basis for a response or an entirely new set of events For instance when a user clicks on a web page or while a database undergoes an updation process it could trigger a set of functions based on these events Furthermore systems can

Related Books