Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why not load-balancing the static resources as well? #33

Open
dotnetwise opened this issue Mar 22, 2015 · 8 comments
Open

Why not load-balancing the static resources as well? #33

dotnetwise opened this issue Mar 22, 2015 · 8 comments

Comments

@dotnetwise
Copy link

Think of a hot code push update. You have 1000 clients to be updated, but only use one server/core!!

@boustanihani
Copy link

Interesting question 👍

@arunoda
Copy link
Member

arunoda commented Mar 23, 2015

NodeJs is not a load balancing static content. So do meteor.

That's why we don't do. Cluster is main for DDP load balancing. For static
content, you can use a nginx in front of meteor.

But if your app is using a lot of static resources, you should use a CDN to
host those stuff. Cloudflare is the easiest way.

Hope this answers your question.
On 2015 මාර්තු 23, සඳුදා at පෙ.ව. 4.47 boustanihani <
[email protected]> wrote:

Interesting question [image: 👍]


Reply to this email directly or view it on GitHub
#33 (comment).

@boustanihani
Copy link

I use Amazon S3

@dotnetwise
Copy link
Author

So HotCode pushes of public folder (static resources) are being served via DDP, right?

Our app is not an website, so the initial load of the static resources is not an issue.
But rather is a cordova/mobile app hence, all the clients will get the static content via hot-code pushes.

@boustanihani
Copy link

They are pushed once to your server when you deploy but then served to your clients via the meteor internal HTTP server (based on Node), not DDP.

@arunoda
Copy link
Member

arunoda commented Mar 23, 2015

@dotnetwise

Yes. your meteor app is work just like it is.

On Mon, Mar 23, 2015 at 2:41 PM boustanihani [email protected]
wrote:

They are pushed once to your server when you deploy but then served to
your clients via the meteor internal HTTP server (based on Node), not DDP.


Reply to this email directly or view it on GitHub
#33 (comment).

@dotnetwise
Copy link
Author

So, how can we make use all the CPUS, rather than just one? (when downloading a hot-code-push)

@markudevelop
Copy link

@arunoda

I'm using meteor-cluster + meteor-up I wanted to ask if this is way has no conflicts? I will have no issues in adding clusters or scaling etc? I love your packages and just decided to use static landing page separated from meteor app and enable cloudflare for static content.

My mup server is on port 3333

  1. cloudflare (like your guide with websockets off) for static content
  2. nginx on my server to handle landing page on domain.com and app on cloud.domain.com here is the nginx file: http://pastebin.com/ne32i776 (is it fine?)

This setup is hopefully trouble free meteor-up with meteor-cluster meteor app?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants