mongodb-container icon indicating copy to clipboard operation
mongodb-container copied to clipboard

Using this for production apps?

Open alikhajeh1 opened this issue 8 years ago • 4 comments

I've been thinking about what it would take to run production apps using this OC template, and wanted to get some advice on the following topics:

  1. Data corruption/loss: Assuming that we're ok with a standalone MongoDB (i.e. we'd rely on K8 restarting a pod following a failure and are ok with few mins of downtime), and have persistent volumes based on GlusterFS, do you guys see any issues with this template being used for production apps? So my concern isn't high-availability, but a pod restart or an unclean shutdown causing data corruption/loss. However, I tested this and the default behaviour is for MongoDB to start in recovery mode when it detects this. As a good practice, we would obviously also be having a backup strategy that we could use to recover following issues.

  2. Upgrades: It seems currently, users could update the image referenced in the deploymentconfig and click on deploy... e.g. when you add support for 3.4, would that be all we'd need to do to upgrade?

Any other areas I should investigate?

alikhajeh1 avatar Apr 28 '17 09:04 alikhajeh1

do you guys see any issues with this template being used for production apps?

@alikhajeh1 Please, what template are you referring?

So my concern isn't high-availability, but a pod restart or an unclean shutdown causing data corruption/loss. However, I tested this and the default behaviour is for MongoDB to start in recovery mode when it detects this.

Journal is enabled by default for this image. So there should be no problem.

As a good practice, we would obviously also be having a backup strategy that we could use to recover following issues.

@bparees How to do backups in OpenShift please?

Upgrades: It seems currently, users could update the image referenced in the deploymentconfig and click on deploy... e.g. when you add support for 3.4, would that be all we'd need to do to upgrade?

For MongoDB upgrades upstream releases document with things to check and fix before upgrade. This applies to images too. (for example https://docs.mongodb.com/manual/release-notes/3.2-compatibility/, https://docs.mongodb.com/manual/release-notes/3.4-compatibility/)

Also testing upgrade in staging environment or data backup is suggested.

omron93 avatar May 03 '17 10:05 omron93

@bparees How to do backups in OpenShift please?

oc rsh into the mongo container, use the mongo tools to create the backup and then oc rsync to pull the backup archive off the pod to your backup location.

bparees avatar May 03 '17 18:05 bparees

@alikhajeh1 Please, what template are you referring?

Thanks for the detailed answer guys, I was referring to this template, which links to this repo...

Re backups, yep, that's exactly what we planned to do.

alikhajeh1 avatar May 03 '17 19:05 alikhajeh1

If I understood this comment right then MongoDB support has been removed from Fedora. So these images shouldn't be used in production, to my understanding

BorntraegerMarc avatar Jun 11 '19 13:06 BorntraegerMarc

mongodb container is not maintained any more in this org. closing.

hhorak avatar Apr 10 '24 11:04 hhorak