Placeholder Image

字幕列表 影片播放

  • Okay.

  • My dude recording today I want to talk about how I built my website because it's more than just a personal website.

  • It's really like a platform where I can deploy all my APS over the next year when we take a look here and we go to my website.

  • You see, it's like this.

  • We got this front end here.

  • You scroll down.

  • We got all this stuff.

  • What none of you can actually see is that we have a bunch going on in the back end, so there's actually a dashboard, but as you can see, we got a 401 It's because we're not authenticated.

  • My website actually has a logging road.

  • It's not linked anywhere.

  • Okay.

  • Wow.

  • Failed to log in that I changed the password.

  • You know, I think I typed it in Rome.

  • Okay, that should be the correct password.

  • Logged in as hang fire.

  • Now a p I slot paying fire, right?

  • Oh, my God.

  • There's a dashboard.

  • This hang fire server can process background jobs right now.

  • Just two jobs.

  • This one statistics goes every minute and the get hub one goes once an hour.

  • Here's my Cuban Aunties cluster we created 15 days ago.

  • You can see we have three nodes here.

  • So these are physical machine while they're not physical.

  • But there they were.

  • They act like they act like physical machines.

  • Let's look at deployment.

  • So we've got multiple deployments.

  • All of these have one container running but the front and has three yet service.

  • You can see each one of these is also a service.

  • You code up all of these programs, and you want to be able to easily scale them up.

  • So how do we do that?

  • I like to focus on back end automation writing algorithms.

  • So what do we need to make this platform?

  • This is what I'm asking myself a few months ago.

  • Some of this stuff is really basic.

  • We need a database.

  • We need background processing, which is just updating our database periodically secure ap eyes.

  • That's like how you saw that I've secured hang fire.

  • We want the front end of the separate from the back end and we want to separate all these things that way they could be developed by themselves.

  • Micro service is, uh okay.

  • This is the architecture.

  • This is the term used to describe the architecture for what I'm trying to do.

  • This is kind of I had to sit down a few months ago and come up with the Micro Service is for our design.

  • So that ended up being an authentication server that uses Jason Webb tokens.

  • I coated this one up.

  • Ah, month ago, when I was on vacation in Jamaica, I can't just sit and, um, you know, be a vegetable on the beach.

  • So I coded up this authentication server E thing.

  • But then here are front and our friend uses the authentication server with a log in a row, and our front end can also access the hang fire background processing server through the dashboard.

  • But the only way you can get there is by logging in.

  • So this is how everything's connected image can be used to build containers.

  • We need to create an image out of each micro service.

  • That way we can create as many containers as we need.

  • The only thing that we have to change in our code is we need to create a docker file, so this will actually create an image out of our source code Gay Hang fire.

  • Oh, look, we have a doctor file as well.

  • It's the exact same thing.

  • Once the source code is in an image, then you can create containers out of it.

  • Once you can create containers out of it, then you need orchestrated with either Dr Swarm or Cuba Netease.

  • This is how you translate your programming knowledge into few.

  • Burnett is knowledge.

  • Each micro service is a deployment, and then I can say create three replicas, and that creates three pods.

  • So a pod is like a container, but it can contain multiple containers.

  • If you want your deployment to be able to talk to other things that you create, a service hears it, here's a deployment, and here's the name of the image.

  • But if we want to scale it up, we can actually just change this number.

  • That's how easy it is.

  • It's the next day.

  • I just want to show you a real life example of how easy it is to deploy us a new code.

  • So we need to first build the image.

  • Okay, when I do, this is gonna start building, but we want to upload.

  • So what do we do?

  • We're gonna push the 1.1 version of our front end.

  • Now we've just modified our file from instead of saying 11.0, we want to pull 1.1 so you can see we have all these other things running, none of those air affected.

  • So the only thing that gets affected is the front end, which is awesome.

  • So I know it's not gonna break any of these things.

  • It's completely separate, is completely separate.

  • So now let's apply the file again, and it's gonna do the same thing where it's like only one of them is up to date Right now.

  • It's gonna create more containers.

  • It's gonna kill off the old ones, and it does all of this without you have without you even noticing, you know, we're live here.

  • So it was really that easy.

  • I don't usually write things for my videos, but I've rode up something because this is such a massive topic.

  • So I'm gonna be reading my screen.

  • It's basically what I'm saying.

  • So my website was not always like this.

  • It started out as a simple front end page with HTML see, assassin javascript and then I wanted to expand into back and Web programming.

  • So I started with no Js.

  • I tried writing him some applications on the back end, such a CZ YouTube descriptions up dater and I made a video about that, but it all started to feel messy when the front end in back end was on the same server.

  • This is when I got started thinking about Micro Service's and I started making videos, talking about how I want to design my server architecture.

  • Many of you recommended that I use Doctor in Cuba, Netease for scale, which I had never done before.

  • I started putting my coat into Dr Images on, and then I played around with daugher, compose and container to contain her networking.

  • Once I felt confident with Dr Composed.

  • I started learning Cuban eighties, and I tried converting my existing Dr Composed files into Cuba, Nettie Files.

  • So I had to learn about PODS, service's deployments and the difference between doctor networks and Cuba Netease networks, so it was very, very valuable.

  • Turns out every service networks on a private i p by default, and to expose the service the outside world, you have to do some extra work.

  • The best solution appeared to be the ingress controller as they have one based on engine ex.

  • So I converted my engine ex knowledge into the engine ex ingress controller and successfully sent requests to the appropriate servers.

  • Then everything started making sense.

  • Surprisingly, uh, yeah.

  • So then everything started making sense, and I deployed my back end to production.

  • Uh, it didn't take much time after that to write up a front end and connected to my back and code base thief.

  • Front end is pretty scalable dot Net know Js hang fire off.

  • Indication.

  • All good.

  • But for now, I have a single instance of a database.

  • If I If I want more than one instance of a database, the data is gonna need to be replicated between the two.

  • So here's the thing.

  • Right.

  • The databases not scalable.

  • It's not the file servers.

  • O file servers don't even exist.

  • Okay, So clearly we've solved these problems, but we haven't solved these problems.

  • What I'm trying to say is that it never ends.

  • I don't know, Guys.

  • What do you think?

  • Do you like these?

  • Do you like these videos where I sit down and blow up my mind?

Okay.

字幕與單字

單字即點即查 點擊單字可以查詢單字解釋

B1 中級

可擴展的網絡應用平臺|我是如何用Kubernetes構建網站的? (Platform for Scalable Web Apps | How I built my website with Kubernetes)

  • 3 0
    林宜悉 發佈於 2021 年 01 月 14 日
影片單字