Book Image

Mastering MeteorJS Application Development

By : Arturas Lebedevas, Jebin BV
Book Image

Mastering MeteorJS Application Development

By: Arturas Lebedevas, Jebin BV

Overview of this book

The web is dead – applications now rule our online experiences. But how are you going to build them? Well, if you’ve been paying attention, you might already have tried your hand with MeteorJS, the JavaScript framework that helps you build complete full-stack web applications that are responsive and fast with ease. Mastering MeteorJS Application Development shows you how to do even more with MeteorJS – if you’re ready to try a comprehensive course through one of the most exciting frameworks in web development today, this is the book you need. Designed to take you through the entire process of building an advanced multipage application with Meteor, you’ll be able to bring your web development ideas with surprising ease. You’ll not only learn how Meteor makes web development easier, but also how you can make using Meteor easier, by automating and simplifying tasks so you can be confident you have full control of everything in your workflow – especially everything that could go wrong. From automated testing to integrating other useful frameworks such as Angular and D3, each chapter covers a crucial element in the Meteor development process. Discover how to integrate animations using Meteor’s Blaze, to give your UI designs the edge, and explore reactive programming to effectively harness RESTful systems in your projects. You will also learn how to deploy and scale your application, two crucial aspects of modern development and vital in a changing digital environment with users expecting a product and experience that delivers. With further insights on developing for mobile – and how Meteor can help you tackle the challenges of the trend – and details on incorporating SEO strategies into your application, this book isn’t just a code tutorial – it’s about creating a product that users love.
Table of Contents (16 chapters)
Mastering MeteorJS Application Development
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Scaling a MeteorJS application


Whatever we have discussed is good for a single instance application. If our application grows with a bigger user base and if the traffic is increasing, we obviously have to scale the system. Most of the time, scaling can be done horizontally, which means we will add more instances and then route the traffic to instances having less load at the moment. With some scaling solutions such as meteor cluster, we can scale vertically by adding more cores to the server.

Let's see in detail how Nginx and meteor cluster help us in scaling our application.

Scaling with Nginx

We have seen how to use Nginx while doing MDM setup. Now, let us see how to use it to scale MeteorJS applications. It is good to install the latest Nginx that supports WebSockets. We are going to use Nginx to be a load balancer, which will redirect the requests to the application instances based on the load in each instance. All we need to do is change the Nginx configuration file to accommodate the...