ERPNext High Availability

A look into ERPNext deployment architecture

 · 2 min read


High Availability refers to achieving the following goals in your setup

  1. Availability of service in case of single or multiple node failures.
  2. No data loss in case of single or multiple node failures.
  3. Availability of good read throughput in case of high traffic.

The Ideal Architecture

Load balancer

The load balancer distributes incoming HTTP requests among application server and the service isn't disrupted in case of a node failure. This makes the service "horizontally" scalable in terms of compute load. If you have only one of these, it's a single point of failure.

Normally, you'd have more than one of Load balancers and they themselves loadbalanced via DNS (which is distributed in true sense). If you have the budget, time and expertise, you can also have the multiple loadbalancers setup via a heartbeat like system.

Application Servers

Application servers process incoming HTTP requests. They query databases/cache if required but do not maintain any state. As long as one of these is up, the service isn't down.

Background Workers

Background workers execute scheduled jobs.

Memcached and Redis Services

ERPNext also depends on Memcached for caching and Redis as a broker for background task workers.

Memcached is distributed by design and adding all available memached nodes in application server configuration is all the configurations that is required. Failure of memcached doesn't cause the service to go down. Failure of one or more memcached nodes is handled automatically by the client (application server).

Failure of a Redis server would cause scheduled and backround tasks of the service to go down. It's possible to setup multiple redis servers in master-slave fashion and software exists to perform automatic failovers (http://redis.io/topics/sentinel).

Database (MariaDB) cluster

The Database cluster consists of multiple nodes and exposes itself as transparent database service to the application servers.

This enables multi node failure and ensures "availability" and "no data loss" in case of a node failure. This however, increases the complexity of your setup.

Setting up a cluster with automatic fail over requires setup of complex monitoring and cluster management software (such as Galera from MariaDB or Percona Cluster Manager). They typical run in multi master and a few read slaves setup. We do not have experience in running this stack in production.

Also, having automatic failover configured is risky. If something goes wrong when your sysadmin is away, data inconsistency/loss or availability issues might occur. This happens to the best in the industry too, https://github.com/blog/1261-github-availability-this-week.

What we do

What we offer is the (simple) setup below. Although single server setup acts like a single point of failure, chances of complexities during failover are less.

Crash plan

  1. Backup & rsync (if possible)
  2. change slave to master
  3. start services (redis, supervisor, nginx) on slave
  4. switch DNS

Pratik Vyas

Pratik takes care of Frappecloud and nags everyone about blasphemous engineering practices. He's also responsible for any cryptic responses and texts related to frappe and erpnext that you may find.

Add a comment
Ctrl+Enter to add comment

M
Ligaepl 5 months ago

Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info.

J
Erp dev 6 months ago

Thanks for the blog. Its helpful

J
web Stories 7 months ago

I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.

M
slot deposit dana 7 months ago

I know your expertise on this. I must say we should have an online discussion on this. Writing only comments will close the discussion straight away! And will restrict the benefits from this information.

M
hotel trivago 7 months ago

This particular is usually apparently essential and moreover outstanding truth along with for sure fair-minded and moreover admittedly useful My business is looking to find in advance designed for this specific useful stuffs…

J
rowery damka 7 months ago

Nice blog and absolutely outstanding. You can do something much better but i still say this perfect.Keep trying for the best.

J
สมัคร Bitazza 8 months ago

The corporation changed into based via way of means of Mr. Kavin Pongphandecha. as Chief Executive Officer And it changed into registered ultimate year. In addition, rapidly after growing this net platform, it acquired a license from the Ministry of Finance as a internet site this is financially strong and secure for investors.

J
SHOPIFY WEBSITE EXPERTS 8 months ago

I felt very happy while reading this site. This was really very informative site for me. I really liked it. This was really a cordial post. Thanks a lot!.

J
transkrypcje filmow 8 months ago

Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts.

M
NFT MARKETING AGENCY 8 months ago

Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained!

J
รับทำ SEO 9 months ago

search engine optimization offerings for customers' commercial enterprise web sites to rank first on Google for humans to locate and locate commercial enterprise web sites which can be less difficult to do. with low-cost carrier expenses Confident in getting your customers' commercial enterprise web sites to rank at the website.

J
class t-shirt printing singapore 9 months ago

Singapore No.1 T-Shirt Printing Solutions | Custom T-shirt Printing | Luminous Printing. Top1 Cheapest & High-Quality T-shirt printing in Singapore? We offer the Best & Fastest t-shirt, custom, and corporate printing solution in Singapore, Browse our latest catalogs with no-minimum order - fast turnaround & Eco friendly! Order Now!

M
list of hospitals in the philippines 9 months ago

Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info.

M
ยาเพิ่มขนาดน้องชาย 9 months ago

Thanks for sharing the post.. parents are worlds best person in each lives of individual..they need or must succeed to sustain needs of the family.

J
cash app routing number and account number 9 months ago

The process of locating the cash app routing number and account number is presumably the simplest on the app. If you've confirmed your account, your Cash app card is activated, then you already have your own Cash app routing number and account number. You can get them by following the steps below: A. To get Cash App Routing Number This is the way to access your Cash app routing number:

Go to the Cash App and sign in with your username and password. At the very left-hand end of the screen When you've reached your desired dollar amount, click on the $ sign. You'll see your routing number (9 digits) on the left, and your account number (9 digits) on the right under your Cash balance. Direct deposit into your Cash app account can now be activated by sharing the details with your employer.

B. On How To See Cash App Account Number As indicated previously, if you want to know how to view your Cash app account number, follow these steps:

Navigate to the Cash app. Right on the home screen's lower left side, click the dollar symbol next to your balance. On the following screen, to the right of the Cash Balance, you'll notice your ten-digit account number. To obtain your account number, tap it. The last eight digits are obscured for security reasons.

M
Agritech manufacturing 10 months ago

Awesome article, it was exceptionally helpful! I simply began in this and I'm becoming more acquainted with it better! Cheers, keep doing awesome!

S
Susan Wray 10 months ago

No matter what our particular case I think a HA arrangement of ERPNext that is scaleable and will endure server disappointment without client experience issues is a fascinating conversation to be had. These are only a few thoughts, I would see the value in a few contributions from individuals who have comparable encounters!

P
Pankaj Wankhede 12 months ago

Hi, I want to transfer live server's public and private folders and database to testing server periodically in ERPNext using rsync. Any help regarding this.

M
cialis 20mg 1 year ago

We have sell some products of different custom boxes.it is very useful and very low price please visits this site thanks and please share this post with your friends.

M
대출나라 1 year ago

This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free.

J
Dissertation Writing Services UK 1 year ago

It is a very interesting topic. I think that when you read informative blog you gain new knowledge and it develops our mind.

M
buy now 1 year ago

Hello There. I found your blog using msn. This is an extremely well written article. I will be sure to bookmark it and return to read more of your useful information. Thanks for the post. I’ll certainly comeback.

J
James 1 year ago

these are best hacks to understand

GS
Gil Salazar 2 years ago

thanks