I have measured Simperium response time for loading a bucket (containing 20-30 small items) with the following code:
var simperium = new Simperium(simperiumAppID, { token: simperiumAuthData.access_token });
console.time("simperiumBucketInit");
var bucket = simperium.bucket("main");
bucket.on('error', function (errortype) {
console.log("got error for bucket: "+errortype);
})
bucket.on('ready', function () {
console.timeEnd("simperiumBucketInit");
});
bucket.start();
Bucket is loaded generally in 1.5-3 secs, which is a bit long, but acceptable. But sometimes it needs 20-30 secs, one time it needed more than 5 mins. Is it global phenomenon? I am using the free tier. Do the payed tiers have better performance?
Performance problems in the past week 9/1 - 9/6 are likely the culprit of database issues we've had. The servers have since been upgraded and performance should be much smoother.
Another possible issue is the connection to the server. The Simperium JS library includes and uses SockJS. It tries to establish a websocket connection, but sometimes this can fail, depending on network/firewall/browser. In those cases, it should fall back to using regular http polling, but this failover can take up to 20s.
It is possible to pass options directly to SockJS and use SockJS options to control the connection behavior and force the use of polling:
var simperium = new Simperium(simperiumAppID, { token: "",
sockjs: {
protocols_whitelist: ['xdr-polling', 'xhr-polling', 'iframe-xhr-polling', 'jsonp-polling']
}
});
Regarding free vs paid tiers, paid/production apps will have dedicated resources separate from free apps so they should have more consistent performance.