Advertisement:

Author Topic: Several upstreams  (Read 1027 times)

Offline Mladek

  • Semi-Newbie
  • *
  • Posts: 15
Several upstreams
« 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?

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,626
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Several upstreams
« Reply #1 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.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Mladek

  • Semi-Newbie
  • *
  • Posts: 15
Re: Several upstreams
« Reply #2 on: September 15, 2019, 05:33:45 AM »
We have 1M+ posts.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,858
    • StoryBB/StoryBB on GitHub
Re: Several upstreams
« Reply #3 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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.