{"id":781,"date":"2018-11-15T06:28:51","date_gmt":"2018-11-15T06:28:51","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw93\/?p=781"},"modified":"2018-11-18T01:22:35","modified_gmt":"2018-11-18T01:22:35","slug":"containers-vs-serverless-computing-rancher-labs","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw93\/index.php\/2018\/11\/15\/containers-vs-serverless-computing-rancher-labs\/","title":{"rendered":"Containers vs. Serverless Computing | Rancher Labs"},"content":{"rendered":"<h5>A Detailed Overview of Rancher&#8217;s Architecture<\/h5>\n<p>This newly-updated, in-depth guidebook provides a detailed overview of the features and functionality of the new Rancher: an open-source enterprise Kubernetes platform.<\/p>\n<p><a href=\"http:\/\/info.rancher.com\/rancher2-technical-architecture\" target=\"blank\">Get the eBook<\/a><\/p>\n<p>Serverless computing is a hot topic right now\u2014perhaps even hotter than<br \/>\nDocker containers. Is that because serverless computing is a replacement<br \/>\nfor containers? Or is it just another popular technology that can be<br \/>\nused alongside containers? In this post, I take a look at what you need<br \/>\nto know about serverless computing, and how it should figure into your<br \/>\nIT strategy.<\/p>\n<h2>Serverless Is Not Server-less<\/h2>\n<p>But first, let\u2019s clear up one point: As you may already know,<br \/>\nserverless computing does not mean that there are no servers involved.<br \/>\nIt\u2019s a cloud-based service, and just like everything else in the cloud,<br \/>\nit runs on servers. That said, serverless is called serverless because<br \/>\nthe service provider handles all of the server-side IT. All you need to<br \/>\ndo is write code and deploy it. The serverless computing provider takes<br \/>\ncare of just about everything else. So your experience is serverless,<br \/>\neven if the underlying infrastructure is not.<\/p>\n<h2>How Serverless Works<\/h2>\n<p>How does it work? One of the most popular serverless platforms is AWS<br \/>\nLambda. To use it, you write code (in C#, Java, Node.js, or Python),<br \/>\nset a few simple configuration parameters, and upload everything (along<br \/>\nwith required dependencies) to Lambda. In Lambda terminology, the<br \/>\npackage that you\u2019ve uploaded is called a function. You can run the<br \/>\nfunction by calling it from an application running on an AWS service<br \/>\nsuch as S3 or EC2. Lambda then deploys your function in a container,<br \/>\nwhich persists until your function has done its job, then disappears.<br \/>\nThe key point to keep in mind is that Lambda takes care of provisioning,<br \/>\ndeploying, and managing the container. All you do is provide the code<br \/>\nthat runs in the container. Everything else goes on behind the scenes.<\/p>\n<h2>A Serverless World?<\/h2>\n<p>Does this mean that we now live in a world where software developers and<br \/>\nIT teams no longer need to deal directly with containers, or with<br \/>\nnuts-and-bolts backend IT at all? Will you be able to just write code,<br \/>\ntoss it to Lambda, and let AWS take care of everything else? If that<br \/>\nsounds too good to be true, it\u2019s for a very good reason\u2014It is too<br \/>\ngood to be true. Serverless computing of the type represented by AWS<br \/>\nLambda can be an extremely valuable resource, and if it isn\u2019t already<br \/>\npart of your DevOps delivery chain, it probably should be. The key word,<br \/>\nhowever, is \u201cpart.\u201d Serverless computing is very well suited to a<br \/>\nvariety of tasks, but it is far from being an all-around substitute for<br \/>\ndeploying and managing your own containers. Serverless computing is<br \/>\nreally designed to work with containers, rather than replacing them.<\/p>\n<h2>What Serverless Computing Does Well<\/h2>\n<p>What, then, are the advantages of serverless computing? When used for<br \/>\nthe kinds of services which it was designed to host, serverless<br \/>\ncomputing can be:<\/p>\n<h3>Inexpensive<\/h3>\n<p>With serverless, you typically pay only for the actual time and volume<br \/>\nof traffic used. Lambda, for example, breaks its time-based pricing down<br \/>\ninto increments of 100 milliseconds. The actual cost is generally quite<br \/>\nlow as well, in part because serverless functions are small, perform<br \/>\nrelatively simple tasks, and run in generic containers with very little<br \/>\noverhead.<\/p>\n<h3>Low maintenance<\/h3>\n<p>The list of things that you don\u2019t need to do when you deploy a function<br \/>\non a serverless platform is much longer than the list of things that you<br \/>\ndo need to do. Among other things, you don\u2019t need to provision<br \/>\ncontainers, set system policies and availability levels, or handle any<br \/>\nbackend server tasks, for that matter. You can use automatic scaling, or<br \/>\nmanually scale use by means of some simple capacity-based settings, if<br \/>\nyou want to.<\/p>\n<h3>Simple<\/h3>\n<p>The standardized programming environment and the lack of server and<br \/>\ncontainer-deployment overhead means that you can focus on writing code.<br \/>\nFrom the point of view of your main application, the serverless function<br \/>\nis basically an external service which doesn\u2019t need to be closely<br \/>\nintegrated into the application\u2019s container ecosystem.<\/p>\n<h2>Serverless Use Cases<\/h2>\n<p>When would you use serverless computing? Consider these possibilities:<\/p>\n<ul>\n<li>Handling backend tasks for a website or mobile application. A<br \/>\nserverless function can take a request (for information from a user<br \/>\ndatabase or an external source, for example) from the site or<br \/>\napplication frontend, retrieve the information, and hand it back to<br \/>\nthe frontend. It\u2019s a quick and relatively simple task that can be<br \/>\nperformed as needed, with very little use of frontend time or<br \/>\nresources\u2014billing only for the actual duration of the backend<br \/>\ntask.<\/li>\n<li>Processing real-time data streams and uploads. A serverless function<br \/>\ncan clean up, parse, and filter incoming data streams, process<br \/>\nuploaded files, manage input from real-time devices, and take care<br \/>\nof other workhorse tasks associated with intermittent or<br \/>\nhigh-throughput data streams. Using serverless functions moves<br \/>\nresource-intensive real-time processes out of the main application.<\/li>\n<li>Taking care of high-volume background processes. You can use<br \/>\nserverless functions to move data to long-term storage, and to<br \/>\nconvert, process, and analyze data, and forward metrics to an<br \/>\nanalytics service. In a point-of-sale system, for example,<br \/>\nserverless functions could coordinate inventory, customer, order,<br \/>\nand transaction databases, as well as intermittent tasks such as<br \/>\nrestocking and flagging variances.<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2017\/10\/09091352\/network-2402637_1280-1024x576.jpg\" alt=\"network\nimage\" \/><\/p>\n<h2>The Limits of Serverless Computing<\/h2>\n<p>But serverless computing has some very definite limits. Lambda, for<br \/>\nexample, has built-in restrictions on size, memory use, and time<br \/>\navailable for a function to run. These, along with the limited list of<br \/>\nnatively supported programming languages, are not necessarily intrinsic<br \/>\nto serverless computing at a fundamental level, but they reflect the<br \/>\npractical constraints of the system. It is important, for example, to<br \/>\nkeep functions small and prevent them from taking up too much of the<br \/>\nsystem\u2019s resources in order to prevent a relatively small number of<br \/>\nhigh-demand users from locking everyone else out, or overloading the<br \/>\nsystem. There are also some built-in limits that arise out of the basic<br \/>\nnature of serverless computing. For instance, it may be difficult or<br \/>\nimpossible to use most monitoring tools with serverless functions, since<br \/>\nyou typically have no access to the function\u2019s container or<br \/>\ncontainer-management system. Debugging and performance analysis may thus<br \/>\nbe restricted to fairly primitive or indirect methods. Speed and<br \/>\nresponse time can also be uneven; these limits, along with the<br \/>\nconstraints on size, memory, and duration, are likely to limit its use<br \/>\nin situations where performance is important.<\/p>\n<h2>What Containers Can Do Better<\/h2>\n<p>The list of things that containers can do better than serverless<br \/>\nfunctions is probably too long and detailed to present in a single<br \/>\narticle. What we\u2019ll do here is simply point out some of the main areas<br \/>\nwhere serverless functions cannot and should not be expected to replace<br \/>\ncontainer-based applications.<\/p>\n<h3>You Can Go Big<\/h3>\n<p>A container-based application can be as large and as complex as you need<br \/>\nit to be. You can, for example, refactor a very large and complicated<br \/>\nmonolithic application into container-based microservices, tailoring the<br \/>\nnew architecture entirely to the requirements of the redesigned system.<br \/>\nIf you tried to refactor the same application to run on a serverless<br \/>\nplatform, you would encounter multiple bottlenecks based on size and<br \/>\nmemory constraints. The resulting application would probably be composed<br \/>\nof extremely fragmented microservices, with a high degree of uncertainty<br \/>\nabout availability and latency time for each fragment.<\/p>\n<h3>You Have Full Control<\/h3>\n<p>Container-based deployment gives you full control over both the<br \/>\nindividual containers and the overall container system, as well as the<br \/>\nvirtualized infrastructure on which it runs. This allows you to set<br \/>\npolicies, allocate and manage resources, have fine-grained control over<br \/>\nsecurity, and make full use of container-management and migration<br \/>\nservices. With serverless computing, on the other hand, you have no<br \/>\nchoice but to rely on the kindness of strangers.<\/p>\n<h3>You Have the Power to Debug, Test, and Monitor<\/h3>\n<p>With full control over the container environment comes full power to<br \/>\nlook at what goes on both inside and outside of containers. This allows<br \/>\neffective, comprehensive debugging and testing using a full range of<br \/>\nresources, as well as in-depth performance monitoring at all levels. You<br \/>\ncan identify and analyze performance problems, and fine-tune performance<br \/>\non a microservice-by-microservice basis to meet the specific performance<br \/>\nneeds of your system. Monitoring access at the system,<br \/>\ncontainer-management, and container levels also makes it possible to<br \/>\nimplement full analytics at all of these levels, with drill-down.<\/p>\n<h4>Working Together<\/h4>\n<p>The truth is that serverless computing and containers work best when<br \/>\nthey work together, with each platform doing what it does well. A<br \/>\ncontainer-based application, combined with a full-featured system for<br \/>\nmanaging and deploying containers, is the best choice by far for<br \/>\nlarge-scale and complex applications and application suites,<br \/>\nparticularly in an enterprise or Internet environment. Serverless<br \/>\ncomputing, on the other hand, is often best for individual tasks that<br \/>\ncan easily be run in the background or accessed as outside services.<br \/>\nContainer-based systems can hand off such tasks to serverless<br \/>\napplications without tying up the resources of the main program.<br \/>\nServerless applications, for their part, can provide services to<br \/>\nmultiple clients, and can be updated, upgraded, or switched out with<br \/>\nother serverless applications entirely independently of the container<br \/>\nsystems that use their services.<\/p>\n<h2>Conclusion<\/h2>\n<p>Are serverless computing services and containers competing platforms?<br \/>\nHardly. Container-based and serverless computing are mutually supporting<br \/>\nparts of the ever-evolving world of contemporary cloud- and continuous<br \/>\ndelivery-based software.<\/p>\n<p><a href=\"https:\/\/rancher.com\/containers-vs-serverless-computing\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A Detailed Overview of Rancher&#8217;s Architecture This newly-updated, in-depth guidebook provides a detailed overview of the features and functionality of the new Rancher: an open-source enterprise Kubernetes platform. Get the eBook Serverless computing is a hot topic right now\u2014perhaps even hotter than Docker containers. Is that because serverless computing is a replacement for containers? Or &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw93\/index.php\/2018\/11\/15\/containers-vs-serverless-computing-rancher-labs\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Containers vs. Serverless Computing | Rancher Labs&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-781","post","type-post","status-publish","format-standard","hentry","category-kubernetes"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts\/781","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/comments?post=781"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts\/781\/revisions"}],"predecessor-version":[{"id":790,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts\/781\/revisions\/790"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/media?parent=781"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/categories?post=781"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/tags?post=781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}