Simple Machines Community Forum

SMF Support => Server Performance and Configuration => Topic started by: Mladek on June 09, 2019, 10:22:17 AM

Title: Several upstreams
Post by: Mladek on June 09, 2019, 10:22:17 AM
Hi,

I run thematic SMF 2.0 forum that works smoothly most of the time, but once a year, due to external event, traffic increases several times and forum goes down because of OOM problems.
I don't want to upgrade hardware because it happens only once a year for one day.
I consider opportunity of putting up copy of SMF for that day, so configuration will be: loadbalancer (nginx) -> two SMF upstreams on different hosts -> one database (mysql).

Is that look viable? Unfortunately, free nginx version does not support sticky sessions and i'm not sure if there will be any SMF problems if nginx will balance traffic depending on source ip.

Someone had such experience?
Title: Re: Several upstreams
Post by: vbgamer45 on July 04, 2019, 05:55:50 PM
How big is your board in terms of posts?
We do have a hidden big board forum with users who have more advanced setups.
Title: Re: Several upstreams
Post by: Mladek on September 15, 2019, 05:33:45 AM
We have 1M+ posts.
Title: Re: Several upstreams
Post by: Arantor on September 15, 2019, 06:09:43 AM
You don't really need sticky session support if you're sharing the database between the instances and using database sessions (or you're using memcache that also shares the settings). As long as the actual cookies make it through and you share the sessions properly, SMF won't care.

The only issue you might have is that you need to make sure you pass through the original IP somehow onto the SMF instances so that bans etc work.
Title: Re: Several upstreams
Post by: Mladek on June 08, 2020, 11:19:00 AM
It worth mention that i did try that setup and it worked well.
Title: Re: Several upstreams
Post by: HostColor on July 14, 2020, 10:15:30 AM
What is the hardware configuration or the virtual one in use in terms of CPU, CPU Cores, RAM, storage, etc?