How to increase sync speed equivalent to firebase realtime

Hi Team,

We have demonstrated grocery app based on Firebase Realtime and Couch Mobile. We mainly need a solution which is on premises in that case Couch Mobile fits perfectly. The only point my management is keep asking me is the Firebase Realtime speed. Which is a little faster then Couch Mobile. To let you know I have not implemented a cluster, load balancing, indexing. Its running on a machine with 4 cores and 12 GB of RAM. So I need your help for a guide , which can help me optimize the structure.

Regards
Pankaj Sharma

@pankaj.sharma,

Couchbase Mobile is designed to work together as one platform to deliver the performance/scale/global business needs of demanding customers like GE, United and more.
Couchbase Mobile is great for business:
-who find it important to deliver a reliable app to users, quickly
-want to focus more on their core business and have an easy and robust solution for sync
-and most importantly those who want to know, see and control what’s going on inside their business

The good thing is that you can tell exactly how fast SG is responding in its logs. So SG might be responding very quickly but you WAN trip might be adding alot of time too. What log level do you have it currently set at?

I would recommend you go with “log”:[“HTTP”,“HTTP+”,“Changes”,“CRUD”,“CRUD+”,“Cache”]

The HTTP+ will give your response times to you HTTP calls,
Changes will give you what what SG send to CBL as far as changes.
Cache will let you know what data is or is not in the SG Cache,
CRUD is good to see what PUT and general data is being exchanged.

Thanks @househippo,

I really appreciate the out of box speed it is providing in the sample APPs we are creating to showcase to our management.

And I am not doubting the framework. What couch base team has done is taken a lot of pain away from developers so that they can concentrate on business logic. I completely agree on it.

I am just a bit curious that if the out of box configuration can be this much fast then what will happen after optimization. Hence wanted to learn best tips and tricks on the optimization part.

Because I come from SQL server Back ground , indexes are always in back of my head. So want to ask what type of optimization can be done so that I don’t find slowness in production due to optimization is not done.

Its more of a preventive maintenance and optimization question.

Just to let you know I have no influence or connection with Fire base Real Time.

Your help will always be great.

@pankaj.sharma,

Look into using the Cache Setting in SG link here: https://developer.couchbase.com/documentation/mobile/1.4/guides/sync-gateway/config-properties/index.html#cache

&

in your load balancer route traffic NOT using Round robin but rather using sticky sessions routing.

@pankaj.sharma I’m very interested to hear more about how this turned out. Any updates you can share?

@hod.greeley Right now everyone is happy with the speed. Mainly because it is a on prim solution and we don’t need to write code for syncing data on local DBs which we used to do.

We are trying different connectors and plugins to finalise what can be used and whats cant ? We will be using elastic search, Kafka , sync gateway , couch base server , couch base mobile, java connectors to build a proof of concept architecture. It looks promising.