1

I have a custom written ecommerce app that runs on it's own dedicated server. All of it's constants (such as database connections, file paths etc..) are defined in a single _constants.php file. The entire code is tracked by svn. (expect for the constants file)

Now we are growing. I'm moving over to a 3 server load balanced apache system, with a dedicated mysql server, and a dedicated "shared" server. The shared server is symlinked from each load balanced server. lb1 is the master and it is set to fsync the public_html directory over to the other servers every 1 minute.

Now i'm faced with the task of moving the app over to the new server setup. Questions:

File path constants. Each of the load balanced server has a different file path for it's public_html folder. What do I do here? Do i just checkout the code to lb1, and put the constants folder outside of public_html? Do I rewrite the constants folder so it can figure out what path it is in?

I'm moving all "shared" files to the shared server, such as images, javascript, css etc.. I'll then change the path to reference to them in the constants file. However, the entire set of code, including these shared files, are included in one svn repo. I was thinking I'd just checkout the entire code base on the shared server as well, even though the only files being accessed are the images,js, and css. Same thing on the lb1. Checkout the entire code base, even thought it will never load the graphics,css,gfx from that location. Makes it easier. I know i'm wasting hard drive space, but this way I don't need to maintain separate svn repos. Am i doing this wrong? Are there any other better ways?

I have a tomcat server running solr. My host has told me they have it running on lb1 and also set to rsync the entire tomcat folder every 1 minute. Should this be good?

I have an admin interface for the staff. They login to change products, process orders all sorts of things. Should i set up a subdomain for them that always points them to lb1 to do their work?

I plan on having all the log files point over to shared. Does that sound good?

Cron jobs. I have a master cron job. It runs codes that hits the db and the logs files. I figure i'll run this on the shared server only, thus another good reason for me having the entire code base on the shared server. How does this sound?

What are some other "best practices" i should know about.

If there is a better place to ask this question please let me know.

Thanks in advance.

5
  • Why does each backend have a different path? You should strive to keep these servers exactly the same, including apache/php configs.
    – EEAA
    May 4, 2015 at 22:42
  • Additionally, I feel as if this is far too broad - you've asked about 10 questions here. You'll likely get much better answers if you focus your questions a bit more and take out the subjective questions.
    – EEAA
    May 4, 2015 at 22:45
  • Paths are different as that is just how the hosting company set them up. I have asked them about that. Well see what they can do.
    – danjfoley
    May 5, 2015 at 1:53
  • So you're not the sysadmin for these servers?
    – EEAA
    May 5, 2015 at 1:54
  • no but the sysadmins are very helpful and will do anything i want/need them to do.
    – danjfoley
    May 5, 2015 at 16:36

0

You must log in to answer this question.

Browse other questions tagged .