[PHP-DB] Load balancing and SQLite
Hey everyone, Currently planning out the databases for a large project, and have decided to use separate SQLite database files for each users hit statistics. The problem is, there are two webservers, with a load balancer. I'm wondering what suggestions people might have on accessing the sqlite databases from either webserver? (As I can't write them to the same disk the webserver is on, without needing to copy it to the other webserver as well.) I _might_ have access to a third system, which I could use for a dedicated database server, but is NFS a viable solution? Would there be a noticeable performance impact when opening the database files remotely? Thanks in advance for any responses, Andy -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Load balancing and SQLite
Andy Ladouceur wrote: Hey everyone, Currently planning out the databases for a large project, and have decided to use separate SQLite database files for each users hit statistics. The problem is, there are two webservers, with a load balancer. I'm wondering what suggestions people might have on accessing the sqlite databases from either webserver? (As I can't write them to the same disk the webserver is on, without needing to copy it to the other webserver as well.) I _might_ have access to a third system, which I could use for a dedicated database server, but is NFS a viable solution? Would there be a noticeable performance impact when opening the database files remotely? Thanks in advance for any responses, Andy Short answer: if you have more than a simple project and / or one webserver, you don't want to use SQLite. If you're worried baout load balancing I doubt you really want to be using SQLite. It's meant as a simple system. If you're making a large project, you probably want to go with a better system, at least mysql. That way, you can run the DB server on one machine and have both access it. You could even run the DB on one of the webservers and have both webservers use it. As for NFS, I haven't had major problems with it myself, but it's always called the Network Failure System by many people I trust. It can (will) also cause quite a bit of extra network traffic, especially since your database engine will reside on a different machine than the database file, likely causing reading of large quantities of data over the network that just get thrown out by sqlite engine. -- paperCrane Justin Patrin -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Load balancing and SQLite
Hi all, I think Justin's absolutely right: don't use SQLite if you're doing the type of project where you need load balancing. As for NFS, I haven't had major problems with it myself, but it's always called the Network Failure System by many people I trust. It can (will) also cause quite a bit of extra network traffic, especially since your database engine will reside on a different machine than the database file, likely causing reading of large quantities of data over the network that just get thrown out by sqlite engine. ALso ... I don't know about SQLite specifically, but I wanted to mention that using NFS w/ these database systems can lead to trouble. Notably, you *cannot* use NFS w/ BerkeleyDB databases on account account of physical drive requirements -- e.g. ability to map drive sectors into RAM, etc. I don't know if SQLite is similar to BerkeleyDB, but as they are both embedded db systems I wanted to point that out. Cheers, Hans -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php