Top 5 Performance So-called Concerns of Meteor JS

Many working with Meteor JS wonders about performance concerns associated with Meteor JS. This blog points some of those concerns and represents my opinion on why they are invalid concerns.

Database as a Bottleneck

Inability to handle heavy read-write loads, especially, write load/performance; However, with latest releases of MongoDB, MongoDB is good enough to easily handle very large data requirements of read/write. Following are related details:

    • MongoDB supports different techniques to scale out appropriately based on the read-write requirements. They are as following:
      • Secondary reads (reads from slaves, writes from primary/master).
      • Sharding techniques
    • MongoDB (3.0+) has come up with new storage engine, WiredTiger, which supports document-level concurrency control for write operations as a result of which multiple clients can modify many different documents at collection level. For most read-write operations, WiredTiger uses optimistic concurrency control and appropriately uses intent locks at global, database and collections level. With servers having multiple cores, multi-threaded write workloads with document level concurrency would turn out to be very beneficial.
    • WiredTiger storage engine can prove to be great for write-heavy apps as it supports write-optimized data structures (such as LSM). It comes up with a great feature of snapshot checkpointing combined with Journal (write-ahead on-disk logging) which makes it durable enough. WiredTiger supports compression which is very much suitable for write-heavy loads.

Details on MongoDB benchmarking for read/write could be found on https://www.mongodb.com/blog/post/performance-testing-mongodb-30-part-1-throughput-improvements-measured-ycsb

Application Scalability Issues

One of the bottlenecks for application scalability is the ease with which application can be scaled out in a very quick manner. Given the support from Galaxy PAAS which is created on underlying robust infrastructure of AWS & Docker containers, one can easily achieve following:

    • Scale out easily by running multiple copies of app
    • High availability configuration support for mission-critical apps

 

Inappropriate Caching Configurations

One of most commonly sighted performance issue is higher page load time. Given Meteor supports in-memory cache (MiniMongo) which gets synced with MongoDB running on the server end, this is nailed down quite easily. Caching uses autopublish feature such that any changes on subscription data is pushed to the cache. In this relation, one may, however, want to appropriately choose whether to have autopublish package enabled. Autopublish is good with smaller set of documents. The best practice is to disable autopublish package and turn subscriptions on and off to control how much data should be kept in the cache thereby managing the network traffic. When a subscription is turned off, all of its documents are removed from the cache unless the same document is also provided by another active subscription.

 

Suboptimal MongoDB Schema Design

There are best practices related with data design which should be followed in order to avoid performance hits. Considerations such as following could help in achieving optimal data design:

 

Suboptimal Queries Performance

Performance issues could arise due to suboptimal query performance. One may use MongoDB profiler to analyse DB operations and optimize queries appropriately. If done that way, performance could be enhanced.

 

Indexes Considerations

Indexes (simple or compound) should be considered to avoid performance issues during query execution.

 

To summarize, Meteor JS should be a good to go framework for any one wanting to start and complete quick app (on Android & IOS). Especially those who are planning a startup in relation with a mobile app, Meteor JS could prove to be a great choice. Be rest assured that it won’t haunt you with performance issue until you become decently big. 🙂

 

Ajitesh Kumar

I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking.

Share
Published by
Ajitesh Kumar

Recent Posts

Agentic Reasoning Design Patterns in AI: Examples

In recent years, artificial intelligence (AI) has evolved to include more sophisticated and capable agents,…

1 month ago

LLMs for Adaptive Learning & Personalized Education

Adaptive learning helps in tailoring learning experiences to fit the unique needs of each student.…

1 month ago

Sparse Mixture of Experts (MoE) Models: Examples

With the increasing demand for more powerful machine learning (ML) systems that can handle diverse…

2 months ago

Anxiety Disorder Detection & Machine Learning Techniques

Anxiety is a common mental health condition that affects millions of people around the world.…

2 months ago

Confounder Features & Machine Learning Models: Examples

In machine learning, confounder features or variables can significantly affect the accuracy and validity of…

2 months ago

Credit Card Fraud Detection & Machine Learning

Last updated: 26 Sept, 2024 Credit card fraud detection is a major concern for credit…

2 months ago