# Commcare production readiness-Things to consider

**URL:** <https://forum.dimagi.com/t/commcare-production-readiness-things-to-consider/877>\
**Category:** Developers\
**Created:** [July 1, 2012, 4:08pm UTC](https://forum.dimagi.com/t/commcare-production-readiness-things-to-consider/877 "2012-07-01T16:08:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Balaji\_rags](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/b/dec6dc/32.png) [@Balaji\_rags](https://forum.dimagi.com/u/Balaji_rags)\
**Post date:** [July 1, 2012, 4:08pm UTC](https://forum.dimagi.com/t/commcare-production-readiness-things-to-consider/877/1 "2012-07-01T16:08:47Z")

</div>

Hi all,

We are hosting commcare internally in one of our project implementations. We are hosting commcare on cherrrypy server. Approximately 300 caregivers/Healthworkers would be using the application.  
We would like to get some advice on production deployment related stuff like  
1.High Availability- Is it possible to run multiple instance of commcare to support HA  
2. Backup- Is it enough to backup Couchdb and PostgreSQL?  
3.Configuring cache- should we do any configuration related to cache for performance boost.

Also let us know if we need to consider any areas for production readiness, that I have missed to mention.

Thanks!  
Balaji G

---

<div class="post-metadata">

**Author:** ![Dan\_Myung](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/dan_myung/32/566_2.png) [@Dan\_Myung](https://forum.dimagi.com/u/Dan_Myung)\
**Post date:** [July 1, 2012, 7:08pm UTC](https://forum.dimagi.com/t/commcare-production-readiness-things-to-consider/877/2 "2012-07-01T19:08:47Z")

</div>

Hi Balaji,

Great questions. My thoughts in order of your questions.

1: HA. Nothing prevents you from following the standard django scaling  
recommendations of multiple instances. Have a central DB machine and 1-2-3  
worker machines behind a load balancer of some type is a basic scaling  
configuration. So long as you define the sessions in a way such that the  
web worker machines can access (via DB on the central machine, or a shared  
memcached session management) you should be ok.

2: Yes

3: Caching on the ORM level for django will yield some benefits, but our  
django models are fewer and far between. So while tools like johnny-cache  
will give ORM performance benefits, it may not be all that a big benefit.  
For Couch related queries, there's not much by way of caching done at the  
moment, given that couch for our current needs is fast and powerful enough  
for aggregate reports and single document views. Caching across multiple  
app servers is going to be a very complicated matter when dealing with  
document update conflicts. Unless you feel really burdened by speed  
issues, I wouldn't attempt couch caching unless absolutely necessary - and  
this is highly dependednt on the types of data you want to view.

Finally, my question for you is what's the reasoning behind wanting to  
scale out your deployment now? Are you finding that your server load is  
exceeding what you have setup now? I ask because our prior deployments of  
CommCareHQ have not yet needed this level of N-Tier architecture just yet  
for the size of deployment you are describing. I'm interested to see in  
what sort of numbers and calculations you are using to reach your decision  
and projected load.

Thanks, hope this helps.

Dan

> **···**
>
> On Sun, Jul 1, 2012 at 12:08 PM, Balaji rags wrote:
> 
> > Hi all,
> > 
> > We are hosting commcare internally in one of our project implementations.  
> > We are hosting commcare on cherrrypy server. Approximately 300  
> > caregivers/Healthworkers would be using the application.  
> > We would like to get some advice on production deployment related stuff  
> > like  
> > 1.High Availability- Is it possible to run multiple instance of commcare  
> > to support HA  
> > 2. Backup- Is it enough to backup Couchdb and PostgreSQL?  
> > 3.Configuring cache- should we do any configuration related to cache for  
> > performance boost.
> > 
> > Also let us know if we need to consider any areas for production  
> > readiness, that I have missed to mention.
> > 
> > Thanks!  
> > Balaji G

---

<div class="post-metadata">

**Author:** ![Balaji\_rags](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/b/dec6dc/32.png) [@Balaji\_rags](https://forum.dimagi.com/u/Balaji_rags)\
**Post date:** [July 2, 2012, 5:39am UTC](https://forum.dimagi.com/t/commcare-production-readiness-things-to-consider/877/3 "2012-07-02T05:39:17Z")

</div>

Hi Dan,

Thanks for your reply.

The reason behind my question of HA was that even though the no of  
mobile users were 300+, I was curious to know how we handle server  
fail-over case(Like if the one server goes down for some reason,the  
other instance can process the request) in prior deployment of commcare  
. That being the case,I wanted to know if it is really required for  
our production deployment considering the no of users we have. If  
your views are that a single instance is sufficient to handle 300+  
user,then i don't see any reason for HA right now.

Regards,  
Balaji G

> **···**
>
> On Monday, July 2, 2012 12:38:47 AM UTC+5:30, Daniel Myung wrote: \> \> Hi Balaji, \> \> Great questions. My thoughts in order of your questions. \> \> 1: HA. Nothing prevents you from following the standard django scaling \> recommendations of multiple instances. Have a central DB machine and 1-2-3 \> worker machines behind a load balancer of some type is a basic scaling \> configuration. So long as you define the sessions in a way such that the \> web worker machines can access (via DB on the central machine, or a shared \> memcached session management) you should be ok. \> \> 2: Yes \> \> 3: Caching on the ORM level for django will yield some benefits, but our \> django models are fewer and far between. So while tools like johnny-cache \> will give ORM performance benefits, it may not be all that a big benefit. \> For Couch related queries, there's not much by way of caching done at the \> moment, given that couch for our current needs is fast and powerful enough \> for aggregate reports and single document views. Caching across multiple \> app servers is going to be a very complicated matter when dealing with \> document update conflicts. Unless you feel really burdened by speed \> issues, I wouldn't attempt couch caching unless absolutely necessary - and \> this is highly dependednt on the types of data you want to view. \> \> Finally, my question for you is what's the reasoning behind wanting to \> scale out your deployment now? Are you finding that your server load is \> exceeding what you have setup now? I ask because our prior deployments of \> CommCareHQ have not yet needed this level of N-Tier architecture just yet \> for the size of deployment you are describing. I'm interested to see in \> what sort of numbers and calculations you are using to reach your decision \> and projected load. \> \> Thanks, hope this helps. \> \> Dan \> \> On Sun, Jul 1, 2012 at 12:08 PM, Balaji rags wrote: \> \>\> Hi all, \>\> \>\> We are hosting commcare internally in one of our project implementations. \>\> We are hosting commcare on cherrrypy server. Approximately 300 \>\> caregivers/Healthworkers would be using the application. \>\> We would like to get some advice on production deployment related stuff \>\> like \>\> 1.High Availability- Is it possible to run multiple instance of commcare \>\> to support HA \>\> 2. Backup- Is it enough to backup Couchdb and PostgreSQL? \>\> 3.Configuring cache- should we do any configuration related to cache for \>\> performance boost. \>\> \>\> Also let us know if we need to consider any areas for production \>\> readiness, that I have missed to mention. \>\> \>\> Thanks! \>\> Balaji G \>\> \> \>
