V
V
VisualIdeas2018-11-09 16:59:51
Nginx
VisualIdeas, 2018-11-09 16:59:51

How to create a simple CDN (perhaps using nginx)?

Good day!
The essence of the problem:

  • there is a website
  • site versions for different countries are located on different subdomains (with a single entry point)
  • I want to create my own mini CDN to deliver all content from a server closer (for Europe, in Europe and in the USA to the USA)

I would like to achieve a workflow like this:
  1. Everything is on one (main) server
  2. Add a geo-dependent subdomain to one of the additional servers and assign DNS records to it
  3. On this, additional, server there is a proxying part (as I understand Nginx)
  4. An additional server caches statics (everything is simple and logical here)
  5. An additional server caches html pages too (Personal accounts, ajaxes, etc. will be on a separate subdomain)

It turns out that a visitor contacting the UK.site.com domain gets to the server in the UK in any case, the UK server forwards his request completely to the main server, everything that the main server returns is cached (with the ability to specify the cache lifetime in the headers (ideally))
Where read how to set it up and is it possible?
You can advise ready-made services (but then with some link to the manual how to set it up for them)))))
Regards...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2018-11-09
@VisualIdeas

How To Use Nginx as a Global Traffic Director

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question