Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

Copy and deliver a request to another nginx server for real traffic testing

I found the solution myself. So I share my finding here.

I used post_action directive for this.

location / {
    uwsgi_pass      unix:app.sock;
    post_action @post_action; 
}

location @post_action {
    proxy_pass      http://dst_host:dst_port; 
}

The request first delivered to unix:app.sock and when it completed, post_action directive pass the request to named location, @post_action.

It works like a charm!

Tags:

Nginx

Uwsgi

Related

OpenVPN bypass on some ports Postfix - accept all email to any user at any domain Make Tomcat use X-Real-IP Windows 7 "Cryptographic Operators" Allow subdirectory with Apache Accessing LXC container's filesystem from host Active Directory authentication load balancing and failover How to check AD DS domain/forest functional level from domain joined workstation? Globally setting ipv6only=off Determine which guest is running on XEN: HVM or PV guest Basic auth for a Tomcat app (JIRA) with Nginx as reverse proxy How do I set a varnish response TTL dynamically?

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy