Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it L'avatar di miki.
    Registrato dal
    Oct 2004
    Messaggi
    1,918

    Sessioni e cluster server

    Mi scuso se c'e' gia' una discussione, ma facendo una ricerca non ho trovato niente.

    Mi domandavo come gestire le sessioni php su un cluster di piu' macchine linux. Visto che se le richieste vengono fatte su macchine diverse si hanno sessioni diverse.
    Ho letto da qualche parte la possibilita' di salvare la sessione su un db mysql e che quindi sarebbe uguale per tutti i server, ma la soluzione sarebbe di fare la cosa a manina, cioe' creare una funzione che scriva e legga il db, e non mi pare proprio il massimo. Volevo sapere se c'era quale soluzione piu' performante e semplice.

    Grazie
    You cannot discover new oceans unless you have the courage to lose sight of the shore

    Caro Dio, quando nelle preghiere ti chiedevo di far morire quel pedofilo truccato, liftato,mentalmente disturbato e di colore indefinibile, non intendevo Michael Jackson.

  2. #2
    Utente di HTML.it L'avatar di gianiaz
    Registrato dal
    May 2001
    Messaggi
    8,027
    leggendo tra i commenti di php.net ho trovato questo:

    Michael Wells
    22-Nov-2004 09:04
    If you are trying to share sessions across a cluster of servers, and don't want to use NFS, or a relatively heavy and slow RDBMS, there is an excellent tool called ShareDance that can do it over a simple TCP protocol. ShareDance comes complete with a PHP interface example and works 'out of the box' for me.

    http://sharedance.pureftpd.org/

    My thanks to Frank Denis for writing this elegant, valuable piece of software.
    bens at effortlessis dot com
    13-Dec-2006 08:25
    Note on using (the excellent!) Sharedance:

    Sharedance as of 0.6 doesn't do any kind of locking. It works well for an application cluster (which I'm using) and allows concurrent writes, which means that the "last one to write wins" order stands. (which has virtually no effect on how I use sessions)
    credo che faccia al caso tuo:

    http://sharedance.pureftpd.org/project/sharedance

    ciao

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.