So… what do I try to do? Build the most complicated web app a noob could try to make, of course!!
My app gathers market data for around 900 cryptocurrencies via one API and publishes statistics, information and graphs with the data. It is a full fledged social network with forums, and almost everything is likable and followable. People can create portfolios and track their values, and get placed on leaderboards for the best performing portfolios. And also submit links and technologies, and rate or discuss them.
As you can tell, there’s a lot going on there. It took me three months of many hours per day to develop the prototype which is many thousands of lines of code. You can see it here: https://www.decentralized.tech
It is being hosted on Meteor Galaxy’s hosting service on a double standard server on a single container. I have the APM activated too.
The app ran fine when it was only me testing it. It was little sluggish at times, but everything always worked.
I incentivized some people to come try the app yesterday and everything broke. I was only seeing 10 connections or less, but publications were taking forever to publish, methods were taking forever too, and sometimes not responding at all, and things were not even loading at times… such as modals with reactive data.
I have two ideas as to how to increase performance:
I do my subscriptions via my Iron router config, and with each route change it kills the subscription from the previous route and subscribes to a new subscription for the current route. I remember reading somewhere that there is a package that will keep these subscriptions alive inbetween route changes. This ought to save some server resources by not resubscribing to data that was already subscribed to.
I noticed on the large datasets that the oplog observer is really slowing things down a lot. Some subscriptions dont need to be reactive, so I need to disable the observeschanges feature on certain subscriptions. That should save some resources too!!
Can anyone give me some other ideas as to how to speed things up, or some good articles to read? Thanks for your time and help!!!