Adding load balancer to a wordpress multisite installation
Asked Answered
I

1

7

I am trying to add a load balancer to a wordpress application which has multi-site installation.

WordPress saves the server IP address in MySQL tables, since there would be two application servers and a single DB server and a load balancer.

i am using a RackSpace load balancer.

Can anyone please suggest what should the DOMAIN_CURRENT_SITE point to in wp-config.php and do i need to make any changes in the Database to update the IP address, if yes what IP address should be stored in DB.

Also, i am using Lsync utility to sync content of one server to another do i need to sycn wp-config.php as well?

Also, apart from wp-config.php and database are there any changes i need to make?

Also, apart from this most importantly how would the session be managed?

Thanks.

Inexact answered 17/5, 2016 at 18:1 Comment(7)
What Load Balancer are you using?Sauncho
Hi, Piyush thanks for your reply. It is a Rackspace load balancerInexact
Yep, I know Piyush, thxInexact
Please add the Rackspace Load Balancer in your question I guess that is the reason why you got down voted.Sauncho
Check my edited answer.Sauncho
Piyush, can you please also tell me how the session would be managed in case of the load balancer?Inexact
Check my edited answer.Sauncho
S
3

If you are using a Rackspace Load Balancer as per your comment you need to use the Load Balancer IP address in the DB tables.

Just make sure the IP address of the Load Balancer you are using is static and not a Dynamic IP Address.

Can anyone please suggest what should the DOMAIN_CURRENT_SITE point to in wp-config.php and do i need to make any changes in the Database to update the IP address, if yes what IP address should be stored in DB.

DOMAIN_CURRENT_SITE should be your primary domain. The IP address of Load Balancer should be stored in database.

Also, i am using Lsync utility to sync content of one server to another do i need to sycn wp-config.php as well?

No need to sync the wp-config.php.

Also, apart from wp-config.php and database are there any changes i need to make?

Please make sure the "Uploads" directory where all media assets are stored is syncing properly for both servers when new file is uploaded. Test the upload functionality of the wordpress and see if the uploaded media file appears on both the server.

Also, apart from this most importantly how would the session be managed?

Rackspace Load Balancer have "Session Persistence" feature, enable it check the screenshot below. Check the black arrow at the end of the screenshot.

enter image description here

Sauncho answered 17/5, 2016 at 18:10 Comment(6)
Thanks Piyush, upvoted your answer. But when i save the Load balancer IP in the DB, which server will respond to request of the files and content?Inexact
Are both the application servers exact clone of each other?Sauncho
Yes they would be exact clone of each otherInexact
It depends on what Algorithm Your Load Balancer you have selected while creating the Load Balancer. This article will make it more clear for you how the Algorithms for Rackspace Load Balancers works. support.rackspace.com/how-to/…Sauncho
Is there any thing else you are looking for?Sauncho
Hi Following up on this did everything go fine?Sauncho

© 2022 - 2024 — McMap. All rights reserved.