Welcome! Log In Create A New Profile

Advanced

Upstream issue

Posted by efiten 
Upstream issue
February 08, 2020 06:23PM
I have the following configuration :

2 IIS servers,
1st is the MASTER server, receiving and streaming videos with NGINX pseudo streaming
2nd is the backup server. every 5 mins the videofiles are synced between those servers.

Now I have a seperate loadbalancer with NGINX, so I can use the master & backupserver both for streaming the videos.
Now, when a video is JUST uploaded, and not synced to the 2nd server, the enduser sometimes gets an error that the file is not found.

I presumed, when a request is not found, it would automatically take the other server, and send that same request, so the end user wouldn't notice an error. Now when the enduser sends the same request again, the other server is used, and the video is streamed.

this is my config :



upstream backend {

server cs.domain.com max_fails=1 fail_timeout=120s;
server cs2.domain.com max_fails=1 fail_timeout=120s;
}
server {
listen 80;
listen 443 ssl;
server_name lb.domain.com
;
ssl_certificate /etc/ssl/mycert.cer;
ssl_certificate_key /etc/ssl/mykey.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;

location / {
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";
proxy_pass http://backend$request_uri;



So what I want, is, when a request is not found on 1 server, it does it on the 2nd, without the enduser needs to resend the request.
is this possible ?

Erwin
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 252
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready