Skip to player
Skip to main content
Search
Connect
Watch fullscreen
Like
Bookmark
Share
More
Add to Playlist
Report
16. Demo Load Balancing - Oracle Cloud Infrastructure Foundations
Psycho Killer
Follow
6 days ago
Category
🤖
Tech
Transcript
Display full video transcript
00:00
welcome to this demo on OCI load balancer in this particular demo this is the scenario or the
00:10
topology we are going to use so you see a vcn here with two subnets a public subnet and a
00:17
private subnet and two web servers and these web servers are instantiated inside the private subnet
00:25
meaning they don't have public ip address and that's okay because the load balancer is in the
00:30
public subnet and these web servers act as backends to the load balancer so this is the setup we are
00:38
going to run for this demo so let's get started the first thing we need to do is is to create a
00:46
virtual cloud network so i'll click on networking click on virtual cloud network and bring up the
00:51
vcn wizard to create the virtual cloud network so i can see there is no there are no networks here
00:56
and i'm in the sandbox compartment so click on start vcn wizard and i'm going to use this particular
01:01
setup vcn with internet connectivity so click on start vcn wizard let's provide a name for the vcn
01:09
so let's say this is my load balancer vcn and uh sandbox compartment is fine and it's giving me a
01:20
cider block for the vcn and the subnets i'm okay with these cider blocks and i'll go hit next and
01:26
and click create and now my vcn will get created now one thing if you recall from the diagram we need
01:32
to do is to modify the security list because we need to add a rule in the security list which will allow
01:39
traffic on port 80 because that's where the web servers are running on those compute instances
01:45
so i i'll come here and then i'll hit uh security list for this one and the default security list
01:54
is the one which is used for uh with the public subnets i'll click on default security list here
02:00
and you can see it has these ingress rules right now so there's traffic on port 22 which is allowed
02:06
and there are a couple of icmp traffic uh rules which are there so i'll click on add ingress rule and i'll
02:12
i'll say for the source i have acquired zero ip address meaning traffic coming from all networks
02:19
all ip addresses and the destination port is port 80. so click that and then i'll add this ingress rule
02:26
so now we have modified the the security list to allow traffic to come to port 80. so the next step for
02:32
us is to go ahead and create a couple of compute instances web servers where we will install apache
02:40
and these will act as backends to the load balancer so i'll click on the navigation menu and click on
02:48
compute and i'll go ahead and instantiate a couple of instances which will act as the the the back end
02:56
for the load balancer so the it gives me a default name i'll say this is my web server one
03:02
sandbox compartment is fine okay with all the availability domains all these options image and shape look okay
03:09
and right here under networking it picks up the load balancer uh vcn we just created but instead of
03:16
putting this in a public subnet we are going to choose private subnet and remember this will ensure
03:21
that these web servers don't get a public ipv4 address and we are also not going to ssh into these
03:27
machines so we'll say no ssh is is is fine here and then right below under advanced options we have an
03:36
option to provide a startup script so we'll just put the startup script here and the startup script
03:41
is pretty straightforward it's a bash script it's basically uh installing apache and it's saying
03:47
that you know it's giving some uh changing the home page saying that you know i'm web server one or
03:52
something right uh and you can read more on you know what startup scripts do so i'll click create here
03:58
with these options and my instance will uh will get created as the first instance is getting created
04:04
let's go ahead and create another instance which will be my web server two so i'll click on create
04:11
instance and we'll call this web server two all the default options look good for networking we will
04:18
again choose a private subnet and basically this will mean that okay let me just
04:34
all right so private subnet it will ensure that you know they don't get a public ipv4 address
04:39
click no ssh and and right here like web server one will provide a startup script
04:49
but this time we will change this to say web server two
04:54
just making sure all the options look good there's still private subnet here load balancer
05:01
and web server 2 is fine so hit create and this would take literally a few seconds 20 25 seconds
05:09
and both my web servers will be up and running and as soon as the web servers are up and running we'll go
05:15
ahead and provision a load balancer and put these uh web servers as back end to the to the load balancer
05:22
so if i click instance here i can see that the web servers are one web server is already running and the
05:28
second web server is getting provision so as this is happening let's go ahead and click on networking
05:34
and click on on load balancer here and hopefully by the time we hit creating the load balancer those web
05:40
servers are up and running so you can see here there are no load balancer so i can click on
05:45
create load balancer and it gives me option to create a layer 4 load balancer also referred to
05:51
as network load balancer or a layer 7 load balancer so i'm okay with creating a layer 7 load balancer so
05:58
click on that and click on create load balancer and here it's a workflow which again it's quite simple
06:05
it just walks you through the steps required to create a load balancer so we're interested in
06:10
creating a public load balancer we'll have an ephemeral ip address under the bandwidth just choose
06:16
the default options which are provided here and for the network it's important now we pick the public
06:22
subnet because the load balancer is actually instantiated in the public subnet so this looks fine
06:30
click next and for the load balancer algorithm there are multiple options so there is weighted
06:37
round robin there is ip hash and least connections in our case we will choose weighted round robin and
06:43
basically what this means is the policy distributes incoming traffic sequentially to each server in in
06:50
a backend set list so right here is the place where we add the backends and click on add backends and
06:56
here you can see both web server one and web server two are running so i'll just click on them and add
07:03
them as backends and and that's it right my backends are added and if you scroll down all these default
07:10
values i'm just going to leave them as is so basically this is saying that we are performing some
07:16
health check to confirm the availability of backend servers and the health check is performed using sttp
07:22
protocol at port 80 that's where my web server is running so all this looks good click next and the
07:29
last step is to configure a listener listener is a logical entity that checks for incoming traffic on
07:35
the load balancer's public ip address because we are running a web server so we are going to use sttp
07:42
and we are going to use port 80 right so that's uh that's the the value we are going to use and uh we're
07:48
going to uh it's kind of a basic demo so we are going to disable any kind of logging here and i'll
07:54
hit submit and literally again this would take uh less than a minute and the load balancer would be up
08:02
and running and once the load balancer is up and running we'll test it and one thing to note would be
08:09
once right now you see the backend set health as pending because it is instantiating uh the load balancer
08:16
it's pinging the back end once all the setup is complete you will see that this status will change
08:23
from pending uh to okay and the color will change to green so let me hit pause here give it a couple
08:29
of minutes or less than a minute and come back and the load balancer would be up and running
08:34
and as you can see here it took literally 30 seconds or so and the load balancer is up and running
08:40
and now the the backend set health is also turned green it says okay and i can pick this uh public
08:46
ip address and paste it in my browser window and bring up the backend sets uh the backends we just
08:54
provision so it says you know connection is not secure of course we did http and right here you can
09:00
see it says uh let me zoom zoom in a little bit more you can see it says uh hello world my name is
09:06
uh web server 2. if i refresh the browser again it says web server 1 web server 2 web server 1 web server
09:14
2. so this is weighted round robin in action and you can uh get a lot of information about the load
09:20
balancer all the matrix the backend set health check etc all this there's a lot of advanced functionality
09:26
there so this is how simple it is to create a load balancer we created one with two backend sets uh
09:34
it's quite straightforward process so hope you found this demo useful thanks for watching
Be the first to comment
Add your comment
Recommended
3:45
|
Up next
43. Support Rewards - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
5:34
42. Tagging - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
6:52
41. Demo: Cloud Advisor - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
8:06
40. Demo: Cost Management - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
3:25
39. Cost Management - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
4:41
38. Pricing - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
6:38
37. Demo Vault - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
7:49
36. Vault - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
10:12
35. Encryption Basics - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
5:48
34. Demo: Security Zone and Security Advisor - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
3:41
33. Security Zones and Security Advisor - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
8:04
31. Security Introduction - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
4:20
32. Cloud Guard - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
8:17
29. Demo: Block Volume - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
3:31
30. File Storage - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
4:19
28. Block Volume - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
5:15
27. Demo: Object Storage - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
7:10
26. Object Storage - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
4:56
25. Storage Introduction - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
4:58
24. Serverless with Oracle Functions - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
2:29
23. Container workloads in OCI - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
9:28
22. Oracle Container Engine for Kubernetes (OKE) - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
4:24
21. Scaling - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
11:42
20. Demo: Creating a Compute Instance - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
2:49
19. Demo: Getting Started with Cloud Shell - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
Be the first to comment