0

I want create some rewrite with nginx (5 million links), I read nginx have the option to save it in a map file but need ages to reload + ram usage when I do it this way.

My Idea was now User -> Nginx -> Node(which gives the link) -> Save the link in a Variable of nginx -> Nginx rewrite to the file

I tryt to supply file direct over node with express but have already 50% usage with 300 connections.

Is this posible or im on the completly wrong way?

thanks

alexander.polomodov
  • 1,068
  • 3
  • 10
  • 14
StefanBD
  • 101
  • 1

1 Answers1

1

You can have the Node server return the link as an X-Accel-Redirect header and Nginx will rewrite the request to whatever link your backend server gives it.

miknik
  • 326
  • 1
  • 7
  • 1
    seems nice, https://stackoverflow.com/questions/23904521/nginx-x-accel-redirect-not-working-with-node-js have asked the same things, nice to know when u know what u have looking for – StefanBD Jul 08 '18 at 13:48