Русские видео

Сейчас в тренде

Иностранные видео


Скачать с ютуб Docker 101: Using Varnish to cache HTTPS requests (updated) в хорошем качестве

Docker 101: Using Varnish to cache HTTPS requests (updated) 3 года назад


Если кнопки скачивания не загрузились НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу страницы.
Спасибо за использование сервиса savevideohd.ru



Docker 101: Using Varnish to cache HTTPS requests (updated)

What’s going on YouTube, We are going to revisit an old topic and talk about setting up a docker container with varnish. To do this, we will set up a new docker container that will have Ngnix and Varnish. The reason why is that Varnish (from the last time I checked) cannot handle TLS / SSL requests. So we will use Ngnix to receive requests on port 80 and 443, and forward those requests to Varnish. If Varnish has the page cache, it will respond with the cache copy, otherwise it will send a request to the back-end server for the proper response. So now, I will show you my DockerFile and Nginx Conf. I will not show you my Varnish VCL, since you should set up the proper one for your environment. But the real secret is that I actually have a site using that VCL and I do not want to give anyone any ideas on how to bypass varnish on the site I get paid to manage. Now with that out of the way, let's see it in action. This first setup will be my dev site without Varnish. We will pay special attention to the response headers. Now this next setup will be with varnish enabled. Pay close attention to the response headers. With the second setup, you will see two additional response headers: “X-Cache” and “X-nhits”. This is one of the ways to know that varnish is set up. At this point, you may be thinking: Why would I do this? The reason why is that varnish is useful when it comes to reducing server load, and delivering faster responses for commonly requested pages. For most websites, the content of the page does not change often, so it does not make sense to have your web application to constantly connect to a database and go through the slow process of generating the same HTML over and over again. In fact, it will be much better just to generate the HTML once, cache it, and then use that copy for every request for that same page. And that is exactly what Varnish does! It caches commonly requested pages, allowing the back-end server not to waste precious CPU resources on continually regenerating a mundane webpage. And that is why you use Varnish. HOWEVER, you typically use this for a production website, and not for a development website. So with that, I hope you learn something new. If this video has helped you out, please like and subscribe for more content like this. But until then, peace.

Comments