ShareThis’ Experience Building Meteor Apps at Scale

ShareThis’ Experience Building Meteor Apps at Scale

By June 1, 2017Engineering

By Vijay Annapureddy

ShareThis uses Meteor to build web apps. Meteor is a full-stack platform for building web and mobile apps in pure JavaScript. A Meteor app includes a client-side component that will run on the client (the browser), which allows Meteor to do what it calls database everywhere. Meteor will take a subset of the database and copy it to the client. Instead of sending HTML code to the client, a Meteor app will send the actual, raw data and let the client deal with it.

Since 65% of ShareThis’ infrastructure is dockerized and running on Kubernetes and in order to use Meteor effectively, we need to build Meteor apps at scale with the ability to handle millions of requests per month. To do this, we first load tested our Meteor applications and observed the performance against the number of requests per second when there are a large number of concurrent requests. In order to render data from the backend of MongoDB’s UI, Meteor servers published sets of records. The response times of our app running on Meteor, plus MongoDB, were unsatisfactory. It took 1.5 seconds for meteor to update 5,000 Mongo documents when tested with 185 requests per second at concurrency level of 125. The ideal response times should be below 1 second.

Important things we observed with running Meteor at scale on Kubernetes are:
Meteor’s default Publisher & Subscription can’t render large number of MongoDB updates in real time
Meteor’s sock.js and sticky sessions requirement make the UI flaky when there are multiple Meteor instance running in parallel behind a load balancer

Read more about our approach to scaling Meteor and the changes we made to our Meteor architecture here:

About ShareThis

ShareThis has unlocked the power of global digital behavior by synthesizing social share, interest, and intent data since 2007. Powered by consumer behavior on over three million global domains, ShareThis observes real-time actions from real people on real digital destinations.

Subscribe to our Newsletter

Get the latest news, tips, and updates

Subscribe

Related Content