Intro Serverless Webinar

23:48 · Watch on YouTube ↗

Transcript 3,107 words · about 21 min to read

Auto-generated captions from YouTube, not hand-corrected, so names and technical terms may be imperfect. The video is authoritative.

[Music] hey how's it going to skew Towson from the CTO advisor calm and you're watching a replay at least a recording of the webinar I gave on serverless Infrastructure October 31st 2017 for more webinars and information on technology in general you can visit me at the c2 advisor comm or follow me on the web at CTO advisor first a little bit about myself and why should you even pay attention to me I haven't had a career in IT that spans about 20 years easily three decades started the career in the 90s spent a couple years at PwC as a management consultant so I bring a perspective that includes the business or management angle as well as IT hence the handle at CTU advisor so let's jump right into the content first off there are servers in every datacenter it's not a data center without servers therefore there are servers in serverless at some point some body racks and stacks servers installs OS installs the control plane for servers that run server lists I've seen a term CPU list I think the other day and I think this is all about context it's all about the developer Microsoft's former CEO wants Fame yet on staging yield developers developers developers there's a bit of I think true finet I think developers are the current hotness in enterprise IT and just business in general the app is the most important part of the data center long of course with the data without the app in the data there's really not much point for dr.

com cloud foundry public cloud if you're using services public health services like directory services database my sequel instance and AWS that has no access to the server OS or some AI a machine learning platform you're just writing code to that platform you don't care anything about the servers in those platforms when they're hosted in the cloud you're just using the api's and the code and coding environments provided by those services an event-driven compute you're keying off some event and you're writing again cold that runs against that if I put either one of these services inside of my data center I have to worry about servers maybe not from the developer perspective but my operating team someone within my team has to Rack stack install operating systems install open with and install open files install in UC io I in UC l io nuke leo I don't know how to pronounce that yet how to reach out to them to find out how to pronounce that if you install those services inside of your data center from the operations team there's definitely control plane servers os's networking and the cetera that you have to worry about as a developer you still consume that from a server Lisp perspective that abstraction still happens for the developer just not for the rest of the operations team so let's give an example of a container base microservices this is basically for us infrastructure folks focus folks to help wrap our minds around a micro service and the I think DNS is a great example to help break it down so in a traditional environment if we wanted to create a high-performing DNS cluster we might take several vm's running ubuntu install buying on those and then put a load balancer in front of it so a VIP in front of those DNS servers and allow that VIP to load balance across those multiple servers obviously highly available highly available platform robust can handle potentially hundreds of thousands of requests minute and we build it for you know basically peak there's the rock solid solution however from a you know just a very broad term that's super inefficient let's say the DNS let's say you're a us-based company and that DNS has only hit that hard no during business hours during non-business hours that those that that huge capacity may only get used by ten percent or less but yet I still have let's say fifteen Ubuntu virtual machines running in order to wait for that load if I had an instant burst of activity you know I could use something like a sleep mode on the OS but if I had instant bursts of activity spanning up those additional buying instances might take some time time enough that a DNS request might actually timeout from a client well this is where the concept of containers come into play I can do the same thing wrap all of that DNS buying and it's dependencies in a container and then throw that image out to a Orchestrator like kubernetes still have the load balancer and front however the major difference is I only use resources as needed so during non-peak hours i'm i only have a couple of containers running dns two for redundancy but during peak the autoscaler will automatically kick up these new containers in microseconds service requests and then when the man goes away you know we like to call you know compare you have this comparison and IT cattle cattle versus pets instead of having all these pets ubuntu buying servers running i now health kettle and I can you know those those those instances you can just go away I've created a micro service within my data center of DNS and I'm using containers to be able to scale out as needed let's take a little bit more complex of a solution let's talk about the actual application that AWS likes to flaunt out as a example of how you combine micro services at the back end of your application and heavier front-end applications to create application were basically no back-end servers administered by the the customer is pretty you know think think it's a pretty good example of serverless technologies so let's first start at the hints where the heavy code so to speak is placed at you have encoders on the left hand side of our image and on the right hand side of our image we have consuming clients so on the left hand side this might be a laptop with let's say I use Camtasia to edit this video so editing software called Camtasia and on the right hand side there's livestream clients so on your mobile laptop or your mobile phone you might have a CTO advisor application or on your mobile client you might have a CTO visor app that allows you to connect to the CTO advisor service to watch these videos that I create what about the middle what what about that front end well starting from the left moving over to the right I would encode this video upload it using AWS cloud front to a s3 bucket once I uploaded it to an s3 bucket s3 creates an event this is where we get this concept of event-driven compute once s3 creates the event it alerts lambda to execute a lambda set of functions so AWS chose to kind of break out all these functions this could be a single function or it can be multiple functions and a single function or a multiple functions it basically creates a set of cascading lambda functions the first one is to create a copy of the video then after it creates a copy of the video it will create a 480p transcode of the video for larger strings a 360p transcode of the video for smaller strings all your only Transco for those devices that are held is meaning no display a thumbnail so you can you know easily browse the various CT Advisor videos and then QoS analytics for either infrastructure or for my own consumption all of those lambda functions create output to a s3 playback bucket then cloud front again another AWS we're facing service allows my front-end clients to connect to the s3 back-end for a playback so from the left to the right there are no server OS is involved in this I've created a set of code that is stored in lambda and only execute upon specific events triggered by s3 a completely serverless application so some obvious question in this case of Lamb lambda where's the cold well the cold is basically stored within AWS and s3 bucket and it only executes when you need it to execute well when does it need to execute well when it's triggered by a AWS event something like a cloud watch even as three event a mics equals service event there's several events that can trigger your cold to run whatever zit run in practically runs in a container about how those containers sized their sized based on memory so the one knob that the developer has is the amount of RAM that it takes to run a process inside of a lambda function and the key part of this is I think really important we'll go back to our example application I mentioned that we could do all of these functions and a single set of lambda code lambda limits the amount of time that a function can run to only five minutes so if I can't complete all of that video transcode in five minutes I need to break the function down to yet a smaller micro service so that I can fit it into the five minutes I do have the look I do have the lover of memory to increase C basically CPU and resources so that it can save me a little programming time to not have to break it up but basically excuse me your breaks basically you have that that ability to control code based on the amount of RAM you put to it making sure that whatever you execute and lambda only takes five minutes or less and lambda scales and is based on the number of events so that's cost from a cost and capability perspective and this is a can be both good and bad one its AWS so from most of us most of our environments this means unlimited skill you don't get charged for lambda until you've reached more than a hundred I'm sorry a million invocations of lambda so that's an awful lot of instances people can use lambda to actually save a lot of money if you've built this previous app with a traditional three-tier layer of server web server application server database server then you're gonna pay for all three of those instances as long as they're running and in traditional applications you know that that that's basically forever in our application you only use this these resources obviously you're gonna pay for your s3 storage and you're going to pay for data transfer cost which you have still with your traditional three-tier app but you're not gonna pay for any of these this transcold functionality if you stay under a million events a month where does this break well in lambda scales bigger than most of our infrastructures can handle so if you're doing if you're in the mixed environment and you can run a million sites simultaneously I'm just on a number out there a million simultaneous lambda events and the persistent storage is a my sequel database well you have the potential to - depending on demand to overwhelm your my sequel back in so AWS in the case of lambda most definitely gives you control over the number of events that you can run at one time all right so hopefully this has been helpful let's close this out first off there are servers in service this is all about perspective from the developer from the developers perspective there are no servers on the back end a good question I get from the original webinar was well shouldn't shouldn't developers know something about the back end and the answer to that question is yes it helps in our most ultimate example of DevOps and all of enterprise IT is Netflix and Netflix there is no differentiation between back-end operations and front-end application that though those things are integrated together developers build in systems into the front-end application that take into account the back-end infrastructure so it's always bad for developers to know about the underlying infrastructure however the promise of serverless is that developers don't have to know about the backend in order to create a application now to back off the off the bat processes that are events or batch driven in nature so we didn't touch on this and the replay but basically we're servers don't play in server lists doesn't play well as if I wanted to create that encoder application I can't really curate that effectively using server list technologies so persistent databases data services in general it'd be kind of a poor idea I think at this point to create a server list file server that kind of makes no sense and then we talked through the cloud and on-premises options at least we highlight them on a slide you can go back review that and see all the the different open source options as well as the cloud-based options from the major cloud providers I hope you enjoyed this replay of the video a little bit different feel without the questions back and forth but hopefully if you missed it this is a great opportunity for you to have caught up if you want to learn more about serverless in general visit the blog the CTO of visor comm where i'll talk about service and a ton of other activities subscribe to the YouTube channel talk to you next webinar