Samuele E. Locatelli 7ad5770297 refresh!
2017-09-25 08:15:47 +02:00
2017-09-25 08:15:47 +02:00

EQN - EarthQuakeNetwork

Gestione progetti EarthQuakeNetwork, www.earthquakenetwork.it

Applicazione di rilevamento terremoti e segnalazione, Android based, sviluppata da Francesco Finazzi e gestita (per infrastruttura server) su cluster steamware in OVH

Di seguito indicato come EQN per brevità

Struttura Logica

A livello logico c'è un applicazione android ed un sistema di server centrali ceh effettuano la vera elaborazione

Servers

Ci sono 3 livelli di server:

---> LB01.eqn -- ---> FE01 -- Internet (RED) --|--> LB02.eqn --|--> GREEN --|--> FE02 --|--> DB ---> LB03.eqn -- ---> FE03 --

  • LB: 3 x Load Balancers (distribuzione carico)
  • FE: 3 x Front End (elaborazione codice PHP)
  • DB: DB principale (ed unico)

in aggiunta

  • RED: server REDIS per persistenza "di breve durata" (redis01)

LB01/02/03

FE01/02/03

Sono macchine Ubuntu 14.04 LTS (andranno aggiornate a 18.04 LTS, saltiamo la 16.04)

Per far funzionare Redis si è scelto un wrapper minimale che non ha dipendenze con le librerie installabili sulla 14.04:

Redis01

Installato server redis. poiché con ubuntu LST era vecchio (vers 3.0) abbiamo aggiornato a ultima release con ppa alternativi:

add-apt-repository ppa:chris-lea/redis-server
apt-get update
apt-get upgrade

DB

Comandi utili

Per ispezionare il server Redis a partire da LB01 (dove sono installati i redis-tools)

redis-cli -h redis01

Verifica carico LB:

Update Vari

2017.09.22

Analisi access log:

_ 22.09.2017 6:25:05 _ 22.09.2017 10:25:23 _ 1'646'359 righe in 4h circa _ circa 115/sec per ogni LB (350 in 3 LB)

ELIMINATO CONF ACCESS LOG:

LB01/LB02/LB03

nginx.conf: eliminato logging (parte saliente)

...

    ##
    # Logging Settings
    ##

    # 2017-09-22 SAM: tolgo log access x performance
    access_log   off;
    access_log /var/log/nginx/access.log upstreamlog;
    error_log /var/log/nginx/error.log;

...

sites-enabled/default: eliminato logging (parte saliente) ... location /srv { #location /mysql { if (request_uri ~* "([^/]*)" ) { set $last_uri $1; } access_log off; #return 301 http://srv.earthquakenetwork.it/$last_uri; return http://srv.earthquakenetwork.it/$last_uri; }

    location /htiles {
    #location /mysql {
            if ($request_uri ~* "([^/]*$)" ) {
                    set  $last_uri $1;
            }
            access_log   off;
            #return 301 http://srv.earthquakenetwork.it/$last_uri;
            return http://htil.earthquakenetwork.it/$last_uri;
    }

    location /nginx_status {
            stub_status on;
            access_log   off;
            allow 79.7.213.2;
            deny all;
    }

...

####FE01/FE02/FE03

nginx.conf: eliminato logging (parte saliente)

...

    ##
    # Logging Settings
    ##

    # 2017-09-22 SAM: tolgo log access x performance
    access_log   off;
    access_log /var/log/nginx/access.log upstreamlog;
    error_log /var/log/nginx/error.log;

...

sites-enabled/default: eliminato logging (parte saliente) ... location / { access_log off; # This is cool because no php is touched for static content. # include the "?$args" part so non-default permalinks doesn't break when using query string try_files $uri $uri/ =404; } ...

S
Description
No description provided
Readme 391 KiB
Languages
PHP 100%