Upstream with vps

Hello guy, I’m sorry for my english
So I have 4 vps:

  1. 4gb ram 1 processor 1 ipv4
  2. 2gb ram 4 processors 3 ipv4 + 3 ipv6
  3. 1gb ram 4 processors 3 ipv4 + 3 ipv6
  4. 1gb ram 4 processors 3 ipv4 + 3 ipv6

I thought this configuration:
vps 1 with nginx and fastcgi php 5.4
vps 2 with nginx for upstream and with mysql 5.5 with replicator
vps 3 with nginx and fastcgi php 5.4
vps 4 with nginx and mysql 5.5 and replicator

the first thing I wanted to tell you if the vps can hold 500/1000
visitors a
day with a dozen domains

vps 2 use it for upstream because it has 3 ipv4 available.
We see the configuration of ngnix.conf:

user www-data;
worker_processes 4;
pid /var/run/nginx.pid;

events {
worker_connections 1024;

multi_accept on;

}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable “msie6”;
text/xml application/xml application/xml+rss text/javascript;
include /etc/nginx/conf.d/.conf;
include /etc/nginx/sites-enabled/
;
upstream backend {
server 79.xxx.190:80; <-- This is vps1
server 199.xxx.72.100:80; <-- this is vps2 (same vps of this file)

}
}

Now setup for one domain:

server {
listen 199.xxx.72.100;
root /usr/share/nginx/computereconomy.com;
index index.html index.htm;
server_name computereconomy.com;
location / {
try_files $uri $uri/ /index.html;
}
location /doc/ {
alias /usr/share/doc/;
autoindex on;
allow 127.0.0.1;
allow ::1;
deny all;
}
location ~ .php$ {
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
gzip on;
ssi on;
ssi_silent_errors off;
}

you think you can use a VPS to the upstream and viewing the site?
or is there something I should do more or less?
the vps1 is a normal setup (nginx) or should I configure it differently?
if
so, how?

Thanx!!

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,236068,236068#msg-236068

you should be able to handle 1000 visitiors/day with a modern smartphone
:slight_smile:

if your vps are running on the same host i’d suggest to strip down your
setup
to 2 machines and apply more ram/cpus for each machine, maybe in a
hot-standby-scenario with a switchable failover-ip.

regards,

mex

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,236068,236072#msg-236072

thanx for answer me.
The all vps is in different datacenter europa and usa.
Yes I know 1000 visitors in 24h for this server is not problem: 0.69
visitors every second, but in reality the visitators can be 500 in same
moment, maybe this is reason I make the load balancing and sure never
know… some time some datacenter can came down.
I wanna know if the back server can work like front server too.
Thank again for answer :slight_smile:

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,236068,236078#msg-236078

depending on your webapp and ability to cache (static) files and content
(e.g. the content changes every 10 minutes -> you can deploy
a 5 min cache) every server should be able to handle that
ammount of request.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,236068,236083#msg-236083

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs