k heitz
asked on
Best Practices using d/b server and web server
Hi Experts ~
I'm looking for guidance on best practices when working with a database server, and a web server.
We have both and all our sites are hosted on the web server.
The work is all done on the d/b server and for many sites, .csv files are created from a SQL query.
My question:
Outside of reducing d/b server traffic - Is there any performance benefit on the site to storing those resulting .csv files on the web server vs. the d/b server?
Thanks
I'm looking for guidance on best practices when working with a database server, and a web server.
We have both and all our sites are hosted on the web server.
The work is all done on the d/b server and for many sites, .csv files are created from a SQL query.
My question:
Outside of reducing d/b server traffic - Is there any performance benefit on the site to storing those resulting .csv files on the web server vs. the d/b server?
Thanks
>> Is there any performance benefit on the site to storing those resulting .csv files on the web server vs. the d/b server?
Kindly let us know the size and record count of that csv file so that we can get a fair idea on what would be better..
Ideally, it would be better to have all data stored in Database and then request only the required data to each and every site..
If you have one or more csv file per site, then it would be difficult to manage all these files and need to ensure whether the local site was able to retrieve data properly or not from those csv files..
So, would recommend storing data in DB Server and fetch only the required data required no. of times..
Kindly let us know the size and record count of that csv file so that we can get a fair idea on what would be better..
Ideally, it would be better to have all data stored in Database and then request only the required data to each and every site..
If you have one or more csv file per site, then it would be difficult to manage all these files and need to ensure whether the local site was able to retrieve data properly or not from those csv files..
So, would recommend storing data in DB Server and fetch only the required data required no. of times..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you all for the insight!
The lag of network speed, will always run far slower than using a local domain socket for HTTP <-> DB conversations.
For .csv files... To little detail... If you're running some query that sequentially reads 1,000,000s of records... repeatedly... every few minutes... you'll require some serious horsepower.
Tip: When creating your .csv files run your process using nice -19 + just ignore this matter completely. Running processes like this means all other processing takes precedence over your .csv file generation, so process will only run when resources are free.