1"use strict";(self.webpackChunkpt_4_docusaurus=self.webpackChunkpt_4_docusaurus||[]).push([[8087],{2889:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>n,toc:()=>c});var n=r(7668),t=r(4848),i=r(8453);const o={date:new Date("2022-12-15T00:00:00.000Z"),authors:"amiller",description:"Discover what serverless technology is, what it is not, and some of the pros & cons of a serverless architecture."},a="\ud83e\udde0 What is Serverless?",l={authorsImageUrls:[void 0]},c=[{value:"What is Serverless? <a></a>",id:"what-is-serverless-",level:2},{value:"Serverless Defined <a></a>",id:"serverless-defined-",level:2},{value:"Serverless Pros & Cons <a></a>",id:"serverless-pros--cons-",level:2},{value:"Pros <a></a>",id:"pros-",level:3},{value:"Cons <a></a>",id:"cons-",level:3},{value:"Summary <a></a>",id:"summary-",level:2}];function h(e){const s={a:"a",blockquote:"blockquote",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.p,{children:"In this post we\u2019ll answer the following questions:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:"What is serverless architecture? (and what it\u2019s not)"}),"\n",(0,t.jsx)(s.li,{children:"What are the pros & cons of serverless?"}),"\n"]}),"\n",(0,t.jsx)(s.p,{children:"If you already know these things, feel free to skip ahead to other posts in this series:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.a,{href:"/blog/serverless/serverless-scales",title:"mention",children:"serverless-scales.md"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.a,{href:"/blog/serverless/serverless-costs",title:"mention",children:"serverless-costs.md"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.a,{href:"/blog/serverless/serverless-tools-and-best-practices",title:"mention",children:"serverless-tools-and-best-practices.md"})}),"\n"]}),"\n",(0,t.jsxs)(s.h2,{id:"what-is-serverless-",children:["What is Serverless? ",(0,t.jsx)("a",{href:"#what-is-serverless",id:"what-is-serverless"})]}),"\n",(0,t.jsx)(s.p,{children:"Depending where on the internet you go to, you\u2019ll get different answers. For example:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/Serverless_computing",children:"Wikipedia"})," defines serverless computing as a ",(0,t.jsx)(s.em,{children:"\u201ccloud computing execution model in which the cloud provider dynamically manages the allocation of machine resources. Pricing is based on the actual amount of resources consumed by an application, rather than on pre-purchased units of capacity\u201d"}),"."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.a,{href:"https://aws.amazon.com/serverless/",children:"Amazon Web Services"})," defines serverless computing and applications as ",(0,t.jsx)(s.em,{children:"\u201cBuild and run applications without thinking about servers\u201d"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(s.h2,{id:"serverless-defined-",children:["Serverless Defined ",(0,t.jsx)("a",{href:"#serverless-defined",id:"serverless-defined"})]}),"\n",(0,t.jsx)(s.p,{children:"In my opinion I think serverless could best be summarized as:"}),"\n",(0,t.jsxs)(s.blockquote,{children:["\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.strong,{children:"Serverless is a cloud architecture in where resource allocation, maintenance, and highly availability is managed by the cloud provider."})}),"\n"]}),"\n",(0,t.jsxs)(s.p,{children:["Serverless is not Docker, nor a virtual machine, and its not code that runs without a server. The term \u201cserverless\u201d is a misnomer, since any application still has to run on some sort of computing machine. The name is catchy, but really should convey that ",(0,t.jsx)(s.em,{children:"serverless abstracts away server resource allocation"}),". It\u2019s a nice thought, to be able to run applications without servers, but as of this writing, the technology is there yet. One must still think about certain structural components when developing serverless apps."]}),"\n",(0,t.jsxs)(s.h2,{id:"serverless-pros--cons-",children:["Serverless Pros & Cons ",(0,t.jsx)("a",{href:"#serverless-pros--cons",id:"serverless-pros--cons"})]}),"\n",(0,t.jsx)(s.p,{children:"There are many pros & cons to the serverless architecture, and whether you are a startup or a large organization you can benefit from a serverless application."}),"\n",(0,t.jsxs)(s.h3,{id:"pros-",children:["Pros ",(0,t.jsx)("a",{href:"#pros",id:"pros"})]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Zero downtime deployment"})," - This is perhaps one of the biggest pros to serverless, the fact that you don\u2019t have to think about or architect high available services. High availability is baked in. In fact, I think this is so important I wrote another blog post just that. Make sure to checkout out Part 2: ",(0,t.jsx)(s.a,{href:"/blog/serverless/serverless-scales",children:"Serverless Scales"}),"."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Faster deployments and quicker time to market"}
1)," - Because you don\u2019t have to worry about infrastructure or maintenance you can focus more of your time on business logic and quick iterations. This means a quicker time to market, naturally a leaner lifecycle."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Reduced costs"})," - This is a double edged sword. In most cases you can reduce your costs by ",(0,t.jsx)(s.a,{href:"https://read.acloud.guru/how-going-serverless-helped-us-reduce-costs-by-70-255adb87b093",children:"several factors"}),", but if you have a consistent load it could also be more expensive. Make sure to read Part 3: ",(0,t.jsx)(s.a,{href:"/blog/serverless/serverless-costs",children:"Serverless Costs"})," to understand the total cost of a serverless application."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Less Infrastructure & Maintenance"})," - Another really big pro is you don\u2019t have to maintain the infrastructure. Your cloud provider handles updates and network management. It most cases you\u2019ll get security updates fixed before you event know they exist. For example, many serverless applications were protected against the ",(0,t.jsx)(s.a,{href:"https://aws.amazon.com/security/security-bulletins/AWS-2018-013/",children:"Spectre Vulnerability"})," before owners of these applications knew it existed."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Great for event-driven applications"})," - Serverless is a perfect use case for event driven applications. By chaining events you only pay for the execution time in response to those events. In a classic setup, you would pay for a server to be available 24/7 until an event needed processing."]}),"\n"]}),"\n",(0,t.jsxs)(s.h3,{id:"cons-",children:["Cons ",(0,t.jsx)("a",{href:"#cons",id:"cons"})]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Multi-Tenancy (Security)"})," - For many businesses and applications this can be a big drawback. When running serverless, you are never on a dedicated machine, you share physical resources with other customers. This can be a big deal, especially for sensitive data."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Vendor lock in"})," - You\u2019ll want to make sure your application is not dependent on any one vendor. In Part 4: ",(0,t.jsx)(s.a,{href:"/blog/serverless/serverless-tools-and-best-practices",children:"Serverless Tools & Best Practices"})," I\u2019ll talk about how to keep your application insulated from specific vendors. You want to make sure you application can run anywhere, both in a serverless and classic environment."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"System wide limits"})," - Depending on your application, it can be easy to reach system wide limits, such as concurrent serverless executions. This is especially common when using the same cloud account for development and production. Many people have accidently DDoS themselves by running load tests on the development environment, effectively starving the production environment of resources."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Backgroun
1d processing"})," - You can\u2019t run jobs like polling (e.g. ",(0,t.jsx)(s.a,{href:"https://aws.amazon.com/sqs/",children:"SQS"}),") or services that need a constant connection (e.g. ",(0,t.jsx)(s.a,{href:"https://socket.io/",children:"socket.io"}),"). Maximum execution time in a serverless environment is limited."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"No dedicated hardware options"})," - If you need specific hardware for your application, serverless does not offer you any choices beyond the amount of RAM."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Debugging"})," - While not impossible, debugging can be challenging especially if you rely on monitoring agents."]}),"\n"]}),"\n",(0,t.jsx)(s.p,{children:"While there are many pros & cons, don\u2019t feel daunted by the task of evaluating if serverless is right for you."}),"\n",(0,t.jsxs)(s.h2,{id:"summary-",children:["Summary ",(0,t.jsx)("a",{href:"#summary",id:"summary"})]}),"\n",(0,t.jsxs)(s.p,{children:["In conclusion, serverless can be defined as ",(0,t.jsx)(s.strong,{children:"a cloud architecture in where resource allocation, maintenance, and high availability is managed by the cloud provider"}),". There are many pros & cons to a serverless architecture, and as we\u2019ll see in my next post Part 2: ",(0,t.jsx)(s.a,{href:"/blog/serverless/serverless-scales",children:"Serverless Scales"}),", serverless can actually simplify many elements of the traditional architecture."]})]})}function d(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},7668:e=>{e.exports=JSON.parse('{"permalink":"/blog/serverless/what-is-serverless","editUrl":"https://github.com/pagertree/pt4-docusaurus/tree/main/blog/serverless/what-is-serverless.md","source":"@site/blog/serverless/what-is-serverless.md","title":"\ud83e\udde0 What is Serverless?","description":"Discover what serverless technology is, what it is not, and some of the pros & cons of a serverless architecture.","date":"2022-12-15T00:00:00.000Z","tags":[],"readingTime":4.61,"hasTruncateMarker":true,"authors":[{"name":"Austin Miller","title":"Founder of PagerTree","url":"https://www.linkedin.com/in/austin-miller-b2b43b36/","imageURL":"https://avatars.githubusercontent.com/u/9020194?v=4","key":"amiller","page":null}],"frontMatter":{"date":"2022-12-15T00:00:00.000Z","authors":"amiller","description":"Discover what serverless technology is, what it is not, and some of the pros & cons of a serverless architecture."},"unlisted":false,"prevItem":{"title":"\u2728 Serverless Tools and Best Practices","permalink":"/blog/serverless/serverless-tools-and-best-practices"}}')},8453:(e,s,r)=>{r.d(s,{R:()=>o,x:()=>a});var n=r(6540);const t={},i=n.createContext(t);function o(e){const s=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.