By Vijay Annapureddy
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: