One ERPNext on multiple servers - performance

For performance reasons can you run one ERPNext installation on multiple servers? So lets say I currently have one server running ERPNext for company A, there performance is slowing down, as they now have to many users accessing the website and the backend. How do I improve this?

Ideally you create a “farm”, you distribute the traffic across multiple servers. How would this be done with ERPNext ? Is it even possible. Alternatively you increase the size of the one server you are already running, increase CPU’s and increase Memory but being able to scale to additional servers would be a better solution. So when someone accesses ERPNext via a domain you either route them to server 1 or to server 2 depending on load on each server.

3 Likes

Have blogged about this, https://blog.frappe.io/blog/technology/erpnext-ha

Vertical scaling can get you very far though

1 Like

Thanks, I do agree it is a complex setup and most frequently not required but there are some good advantages as well:

  1. In a v-block set up, you virtually create and destroy the various servers you need to handle the demand, This means you can reduce costs massively becasue you only create a front-end application server when needed and only pay for while it is running.

  2. If one of the application servers fails any new traffic would automatically be routed to a working application server reducing end user failures.

  3. Performance is ensured

  4. Distributed architecture meaning if it is a company across the globe you can access a local application server instead of accessing one across the globe somewhere.

But setting up a single stack and scaling vertically simplifies the architecture and reduces any connectivity issues between application servers, workers and databases. So lets ask the following questions in response to your vertical scaling

  1. What would be the recommended CPU and RAM setup for lets say 25 users versus 250 users? (Is there a way to know or is it trial and error)

  2. How much does the website functionality affect the backend functionality. You may only have 10 people working in the backend which is limited load, but your website is very popular and you have thousands of people accessing it. What impact would these people visiting the website have on the backend experience? (I am not sure without extensive testing if this could be even guessed)

Thanks for the input, I am trying to decide if the vertical scaling would be fine or if ERPNext setup has some drawbacks for me if I cannot do distributed. Thanks

I agree, with distributed, scaling up an down is easy.

The website pages are cached and website requests would not hit the database. You can try to stress test the system and then decide. eg, digital ocean has multicore + high ram (upto 16G) charged by the hour.

I am curious what kind of setup are you looking for. Are you planning to resell as hosting or want to host a single company?

Thanks, looking at hosting a single instance for a single company but looking at scalability ideally because of peaks. There are a few hours a day where the system demand will be high and then a longer period where the system use will be low apart from website hits. This is why I am saying auto scaling is ideal because to pay per hour for a multi-core + high ram system when no one is using it is a waste of money. If you can auto scale it down you save money.

Hi everyone,

I’m just curious if the HA solution had been implemented in the real life or it is still in the theory :smile:

Actually, I’m looking for a solution with a multi-server setup (more than 2) for having:

  • HA and failover scheme, if one or more servers are down
  • how the traffic would be distributed/balanced between more than 2 servers?
  • How the database backup/restore procedures are going to be processed?
  • Would it be possible to upgrade the ERP instances with a zero downtime and keep the services operational? So, the users won’t be affected and won’t feel any differences (excepting the updated ERPNext instance).
  • How much servers are possible in such a farm/cluster?
  • Are there any network/infrastructure requirements for this humongous setup?

Please share your experience and thoughts.

Thanks.
Ilya

Hopefully this information will be helpful, at least understanding how you would go about splitting the services, you could always change the approach to a docker setup.

With Kubernetes setup, checkout

1 Like

Very interested in that blogpost.
the URL you posted seems not to be working though and there is not search on the blog …

Can you kindly update the link to your article?

@revant_one Can you mention the steps to be followed for this erpnext HA architecture? becoz its was last published on 2014, is there any latest update on this setup?

Nothing related to this setup.

I mentioned about kubernetes setup.

1 Like

@revant_one thank you for reply. Am trying to setup a HA with nodefailover, where web server in a machine and db in a separate machine do you have any idea about it?

No idea about non kubernetes setup.

related video

1 Like

Thank you for the response.