XF 2.2 Can XF Scale Horizontally?

⭐ Alex ⭐

Well-known member

Question 1:​


If I were to launch a host XF instance configured as the same forum, as a second node behind my load balancer, given the data and internal_data directories are on S3, would this work without issues or would having a duplicate set of cron tasks that XF schedules in the background be detrimental.

Question 2:​


If I were to host a second XF instance configured as the same forum, only accessible as the XF API. Would this work or will XF still start cron tasks when triggered from an API call? If the XF API could be separated from the forum as a deployable serverless application, that would also be amazing.
 
Solution
If both instances share the same database, yes it would work fine. I have multiple servers setup to serve the same websites (failover/load balancing) and it works fine once you work out some of the complexities of keeping multiple servers in sync. Using S3 for data and internal_data will keep those parts in sync, but something else to think about is how you are going to keep internal_data/code_cache in sync (it won't go to S3, nor would you want it to because it houses important things like templates... so if you edit a template or phrase you need a mechanism to sync those changes to your other servers).

Check your settings under XF Admin -> Options -> System and performance. In there, you can set Job run trigger to be...
If both instances share the same database, yes it would work fine. I have multiple servers setup to serve the same websites (failover/load balancing) and it works fine once you work out some of the complexities of keeping multiple servers in sync. Using S3 for data and internal_data will keep those parts in sync, but something else to think about is how you are going to keep internal_data/code_cache in sync (it won't go to S3, nor would you want it to because it houses important things like templates... so if you edit a template or phrase you need a mechanism to sync those changes to your other servers).

Check your settings under XF Admin -> Options -> System and performance. In there, you can set Job run trigger to be activity (browser) based or server based.
 
Solution
If both instances share the same database, yes it would work fine. I have multiple servers setup to serve the same websites (failover/load balancing) and it works fine once you work out some of the complexities of keeping multiple servers in sync. Using S3 for data and internal_data will keep those parts in sync, but something else to think about is how you are going to keep internal_data/code_cache in sync (it won't go to S3, nor would you want it to because it houses important things like templates... so if you edit a template or phrase you need a mechanism to sync those changes to your other servers).

Check your settings under XF Admin -> Options -> System and performance. In there, you can set Job run trigger to be activity (browser) based or server based.
Aha! So If I set it to server based trigger, and setup the cron on the forum instance, then an API instance can run happily along doing its own thing and won't trigger jobs.
 
Back
Top Bottom