0:00 by the end of this video you will know
0:02 not only what enginex is but also why it
0:06 was created and what it's used for with
0:09 real life examples back in the day when
0:12 the web was still simple with less users
0:15 the basic use case was a browser
0:17 requested a web page from one web server
0:20 the web server was a server machine that
0:23 had a software installed on it that
0:25 assembled the page and sent it back to
0:28 the browser which then displayed it to
0:31 the user a piece of software that runs
0:34 on a server machine and can respond to
0:37 requests from a browser and that web
0:40 server software that was enginex a piece
0:43 of software that runs on a server
0:45 machine and can respond to requests from
0:48 a browser then web became popular so you
0:51 had thousands or millions of requests
0:55 per website imagine one single server
0:58 handling millions of requests
1:00 that's way over the technical limit of a
1:03 server software well we need a few more
1:06 servers to handle that load so we added
1:09 10 enginex web servers but now we need
1:12 something that determines where requests
1:15 from the browser and which one of those
1:18 10 servers will handle them and that's
1:20 where load balancing comes in so the
1:22 same engine X web server becomes a load
1:24 balancer that proxies the requests to
1:28 those 10 web servers and by the way the
1:30 word proxy means to do something on
1:33 someone else's behalf so it accepts the
1:36 browser requests on behalf of the web
1:38 servers so it sits at the entry like a
1:41 concierge and then distributes the load
1:44 among the web servers now how does it
1:47 distribute the load that depends on
1:49 whichever algorithm was configured on it
1:51 it could be a simple logic such as just
1:54 whichever server is least busy gets the
1:57 request or it could be round robin which
1:59 is a popular algorithm that basically
2:01 distributes the requests equally in a
2:03 cyclical manner so very simple load
2:06 balancing logic so now we have engine X
2:09 as web server software and the proxy as
2:13 well and that load balancing is just one
2:17 of the functionalities of enginex proxy
2:20 so it's the same server and Technology
2:22 but with a different task now so what
2:25 are those other features or
2:27 functionalities of a proxy imagine new
2:29 New York Times article comes out and
2:32 millions of people open it on their
2:35 laptops in the browser now imagine every
2:37 time the request lended with one of the
2:41 web servers that assembled the response
2:45 like put the images together get them
2:47 from a database put text and paragraphs
2:49 and everything together edit all the
2:51 links sent it back as a response and
2:54 this happened million times pretty
2:56 inefficient right instead it makes sense
2:58 to assemble this article get all the
3:01 data from a database put the text and
3:03 links and everything together once and
3:06 store it it's a static article it's not
3:08 going to change right so just keep one
3:11 final copy and send it to everyone who
3:13 requests it that's caching functionality
3:16 and it is another main feature of engine
3:18 X proxy server so you can configure
3:21 caching on engine X proxy so you don't
3:23 have to hit the database or the web
3:25 servers every time a request comes in it
3:27 will just return that cached file now
3:30 imagine we have hundred 100 servers of
3:32 an online banking application or a
3:35 social network like Facebook that makes
3:37 those servers a pretty juicy Target for
3:40 hackers they all want to hack into your
3:42 servers and get the treasure which is
3:44 payment data personal data passwords and
3:47 so on now imagine you exposed all 100
3:50 servers to Public Access so basically
3:53 all those requests can directly hit each
3:56 of the web servers if you do that you
3:58 actually make work for hackers so much
4:01 easier they would need to find just one
4:03 issue in one of those 100 servers and
4:06 they could potentially break into your
4:08 entire system because all your servers
4:10 are publicly accessible directly they
4:12 can just ping the hell out of them and
4:14 probe them until they find an issue or
4:17 an entry because you forgot to update a
4:19 library or a software package and they
4:21 can hack your web server application so
4:24 you have to worry about absolutely
4:26 perfectly securing 100 servers now in
4:29 instead we just give them one server
4:32 that is the only one that's publicly
4:34 accessible you can put all your Titus
4:37 security efforts on one server instead
4:40 of 100 servers and this way having one
4:44 entry point which is the proxy is
4:46 publicly accessible entry point reduces
4:50 the security attack surface tremendously
4:53 and basically acts like a shield or
4:55 security layer before all those web
4:58 servers so in addition addtion to load
5:00 balancing and caching a very very
5:03 important functionality of a proxy is an
5:06 eded security for your web servers now
5:09 talking about security I mentioned that
5:11 since we have one entry point we can
5:14 focus all our efforts to securing that
5:16 one proxy server in all aspects and one
5:20 important security measure is encrypted
5:22 communication so front end will send
5:25 encrypted message to the proxy which
5:27 means even if an attacker sees that
5:29 traffic on users browser or during the
5:31 transmission they can't read it only the
5:34 proxy server can decrypt it but again
5:36 for edit Security in many systems proxy
5:40 that act as The Shield a security Shield
5:42 will simply pass on that encrypted
5:45 message to the web servers and the web
5:47 server will decrypt it itself which is
5:50 actually a better security practice so
5:52 here the functionality of a proxy is to
5:54 be able to accept encrypted traffic with
5:59 s SL encryption so you can configure
6:01 your proxy to deny any request that is
6:05 not encrypted and only accept encrypted
6:07 requests now imagine Netflix which by
6:11 the way uses engine X in its backend and
6:14 as we know Netflix has millions of users
6:17 so it's getting millions of requests for
6:20 videos on its web servers and let's say
6:23 it's an evening in New York millions of
6:26 people come home after work all at the
6:29 same time they switch on Netflix and
6:31 start watching the most popular series
6:34 at that time that means Suddenly at the
6:37 very same time millions of requests for
6:40 a highquality video is sent to Netflix
6:44 so in this case imagine that engine X
6:47 proxy server would have to send back the
6:49 entire highquality video to millions of
6:52 users at once that's a lot of bandwidth
6:55 imagine how long it would take to send
6:57 it over the internet cables all the way
7:00 to the TVs of millions of viewers that's
7:03 where compression helps engine X proxy
7:05 can also be configured to compress large
7:08 images or video files to save bandwidth
7:11 both on the side of the clients so
7:14 people who are receiving those large
7:17 files but also on the server side who is
7:19 sending all that content so it arrives
7:22 faster and uses up less of your internet
7:25 bandwidth and as part of it it also
7:28 supports sending responses in chunks
7:30 instead of the entire file at once so
7:33 basically it sends you part of the video
7:35 and then by the time you have watched
7:37 the first half the second half of the
7:39 video has been sent over to you as well
7:42 so these are all the functionalities
7:44 that you can configure for enginex as a
7:47 proxy server now you may be thinking how
7:50 do you make enginex do all these things
7:52 how do you configure them how do you
7:54 tell enginex whether it should act as a
7:56 web server or a proxy server and how do
7:59 you configure all these caching and SSL
8:02 traffic and all this stuff well that's
8:04 where enginex configuration file comes
8:06 in which lets you define all this
8:09 configuration with so-called directives
8:12 this is where you can define whether you
8:14 want your engine X to be a web server or
8:16 a proxy server simply by configuring
8:19 whether it should forward the traffic to
8:21 other web servers or whether it should
8:23 handle it itself you can configure which
8:25 Port you want engine X server to listen
8:28 on this is an example of a simple web
8:31 server configuration that listens on
8:32 Port 80 and with location basically
8:36 defines from where in the file system it
8:39 should serve those static files back to
8:42 the browser but as we learned
8:44 communicating on Port 8 or HTTP Port is
8:47 insecure instead we want to encrypt all
8:50 the communication and you can configure
8:52 that easily in engine X to Route any
8:55 traffic coming on Port 80 to https by
8:59 sending L those requests to https and
9:02 point and here we have an https server
9:06 configured that serves the files as well
9:08 as specifies the SSL certificate
9:11 location the public key and the private
9:13 key for the SSL communication and it
9:16 listens on the https Port 443 so that's
9:20 a simple configuration that allows you
9:22 to twe enginex to handle requests like
9:25 that you also have its own configuration
9:28 to configure load balance to multiple
9:30 backend servers and within that
9:32 configuration you can also Define which
9:34 load balancing algorithm to use like
9:37 select the least busy server or use the
9:40 default one which is R Robin which as I
9:42 said just equally distributes the load
9:45 in a cyclical order between those
9:47 servers you also have the caching
9:49 configuration with multiple different
9:52 elements like how long the cache should
9:54 be stored before it's refreshed and so
9:57 on and as you see the configuration of
9:59 all these functionalities is pretty
10:01 straightforward and it's also pretty
10:03 granular like you can do tons of
10:05 different configuration with engine X
10:08 and you actually have a full list of all
10:11 those configuration blocks and
10:12 directives in this list here which is a
10:15 pretty huge list and as you see the
10:17 configurations for proxy functionalities
10:19 have proxy prefix so you can
10:21 differentiate them as
10:24 well now engine X is very flexible as
10:27 you see and super fast as well so it
10:29 became very popular in containers as
10:32 well and made its way as one of the most
10:36 popular solutions for kubernetes Ingress
10:38 controller functionality Ingress
10:40 controller is essentially a proxy with
10:44 Advanced load balancing functionality
10:46 but for kubernetes so what engine X was
10:48 doing for simple web servers it's now
10:50 doing for kubernetes cluster in the form
10:53 of Ingress controller acting as a proxy
10:55 and load balancer that receives the
10:58 incoming traffic first and then based on
11:00 the configuration that we Define
11:02 forwards it to the right service inside
11:04 the cluster now this load balancing
11:07 configuration as well as logic is more
11:09 advanced and more kubernetes specific
11:12 but the idea is pretty much the same and
11:14 I actually have full videos on Ingress
11:16 and Ingress controller and how to
11:18 configure it you can watch on my channel
11:20 in fact I create these tutorials
11:23 regularly on lot of interesting
11:25 Technologies so if you want to educate
11:27 yourself in tech make sure to subscribe
11:30 and activate notification to get those
11:33 new tutorial videos now there are
11:36 actually many ingis controller
11:38 implementations out there for kubernetes
11:41 but enginex is one of the most popular
11:44 ones and I have actually used engine X
11:47 Engish controller in most of my projects
11:50 as well now some of you may be thinking
11:52 doesn't each Cloud platform have its own
11:55 load balancer why do I need engine X as
11:58 a load balancer well you actually need
12:01 both engine X Ingress controller which
12:03 acts as a load balcer is used inside the
12:06 cluster so unlike the proxy for web
12:09 servers it's not publicly accessible so
12:12 you can't access the engine X Engish
12:14 controller directly from the browser it
12:16 actually leaves inside the cluster
12:19 Network and forwards the requests
12:21 internally so who is getting the
12:23 requests from public what is the public
12:26 entry point for the browser requests
12:28 that's the cloud load balancer like awsb
12:32 for example which then forwards that
12:35 request to the ingis controller inside
12:37 the cluster and this is important
12:39 because it adds a very important
12:41 security layer to those requests so the
12:44 cluster component is never directly
12:47 exposed to Public Access instead every
12:50 request comes from the cloudload
12:52 balancer which then forwards it to the
12:56 ing controller within the cluster which
12:58 then routes that traffic based on
13:02 intelligent logic to different
13:04 applications within the cluster and with
13:06 intelligent routing what I mean is if
13:09 you have one large application with lots
13:11 of sub segments or microservices for
13:13 example you can configure your Engish
13:15 controller so if the request URL
13:17 includes online card it routes the
13:20 traffic to online card microservice if
13:22 it includes payment it routes the
13:25 traffic to payment service and so on now
13:27 some of you who've been in it for little
13:30 longer may have worked with Apache web
13:33 server so what's the difference between
13:34 Apache web server and enginex web server
13:37 well not much actually enginex and
13:40 Apache web servers do pretty much the
13:42 same thing just like enginex Apachi also
13:45 used to be a basic web server and then
13:48 they extended its functionality as a
13:50 proxy and it has all these benefits and
13:53 functionalities of a proxy that we
13:56 discussed Apachi was actually already
13:58 widely used used when enginex was
14:00 created and the major benefit of enginex
14:03 was that it was faster more lightweight
14:06 and definitely had an advantage when it
14:08 came to serving huge amounts of static
14:11 files plus as you saw it has a pretty
14:14 easy configuration as well and engine X
14:16 also became more popular in the
14:17 container world now I hope you got a
14:19 clear overview of what enginex is and
14:22 hope I've answered all the questions you
14:25 may have had while learning about
14:27 enginex and with that thank thank you
14:29 for watching and see you in the next
14:31 video