Production setup

We are about to submit an iOS app to Apple for review, using CBLite. Currently we have a 4GB instance on Digital Ocean running both SG and CB Server (via docker images). We’ve had one SG crash during our testing period, which was quickly remedied by starting it up again, but a little disconcerting. What would be a recommended configuration? I am thinking at the very least to have SG running on its own say 2GB instance.

We currently have no writes to the remote database, and only very occasional (but potentially large) pull replications to the device.

We are using Couchbase Server 4.5.1 CE and SG 1.4, with CBLite 1.4.
Should I upgrade Couchbase Server?

Also, how best to deal with the need to perform an _offline / _resync / _online cycle once in production?

We’ve had one SG crash during our testing period

Can you report an issue on the SG github repo for that?

What would be a recommended configuration?

It depends on a lot of factors. @househippo do you have any insight?

Should I upgrade Couchbase Server?

If you are building a green-field app, you may want to use SG 1.5 and CB 5.x to take advantage of the mobile convergence feature which allows SG and the CB SDK to both write to the bucket.

Also, how best to deal with the need to perform an _offline / _resync / _online cycle once in production?

I will ask around to try to get some answers on that.

Also, how best to deal with the need to perform an _offline / _resync / _online cycle once in production?

See Couchbase Capella for Mobile Developers

Thanks. My main question, given the expected usage, is it is advisable or not to have both Sync Gateway and Couchbase Server running on the same 4Gb instance?

The usual advice for Couchbase Server is to give it it’s own hardware / virtual hardware.

I have a very similar setup for an iOS app.

The official recommendation is to not run CB and SG on the same node. However I do and it works great. This is assuming your load is not too great. If you load grows it will be a problem, but you can always add nodes then.

I will say that 4G RAM is not enough. That’s barely enough for just CB. I run a 16GB node on Linode and have CB, SW and NGINX all running in containers. It’s super stable for me.

T

1 Like

Thanks @toddfreese thats very helpful. I will resize my server instance. I have a static floating IP so if needed I can add more nodes and a load balancer and move the floating IP to the load balancer.