Difference between multibench and multitenant setup

Please can anyone elaborate further the difference between multibench setup and multitenant setup and when to apply each of them?
Thanks alot.

from the top of my head I think

Multitennant

  • various instances of the exact same version of ERPNext/Frappe
  • updates change the code for all instances

Multibench

  • each bench can host a separate version of Frappe/ERPNext
4 Likes

To start there are these docs

3 Likes

Why I am asking is I once ran a multitenant setup (port based) on my VM, and when I did a force restore on one of the sites, it affected the second one. I’m wondering how to stop this from happening next time I try such a thing. I don’t know if someone can help me with a solution for this. Thank you.

1 Like

As multi tenants(multi instances or multi sites) are actually multi databases but same codebase, in other words: code changes will impact all instances.

Multi bench has independent codebase and database for each bench (folder).
So for your case and requirement, you need go for multi bench.

4 Likes

Multitennant

  • different sites (database) using same codebase - useful if you are not changing core code.

Multibench

  • each site has its own codebase (i.e. you can have different version/codebase for different sites). useful if you are changing core code as per client requirements.

Oh ok, that’s nice and very clear. Apparently it’s advisable that when one want to have multiple sites, they should go with multibench. This way they can have independent codebases and database for each folders.

Hello all,
Please is it possible for anyone to give me a step by step procedure in setting up a multibench.

This is what I have done so far;

  • bench init bench-name
    Create a new site.
  • bench new-site site-name
    -bench setup nginx
    Manually changed server port 8000 to 8001 in nginx.conf and supervisor.conf; including changing the 9000 to 9001, 11000 to 11001 e.t.cl
    Changed the redis port in /sites/common_site_config.json.
  • bench setup socketio
  • bench setup redis
  • service nginx reload
  • supervisorctl reload

After doing all these, I still couldn’t access the new site on the new bench.

I will be grateful for some assistance on this. Thanks alot.