Conversation about SSR, DDP, and "static" pages

I want to have a conversation about building an app with optimized static pages with meteor.

I imagine React SSR with a proxy cache would be ideal for performance.

Also, ideally DDP initialization should be able to be controlled based on route. For example, if I have a static home page and other static links, there’s no reason to initialize DDP yet. I’m not sure if this is something is possible in Meteor or if MDG considered it.

I’m looking into building something like a wordpress CMS, so the admin panel (and maybe other parts) would use DDP but the main public pages don’t need it.

Is there any cost to always initializing the DDP connection, especially if you aren’t waiting for any data? It’s done asynchronously after the page is loaded, so it doesn’t block your initial HTML from being displayed AFAIK.

Honestly I don’t know.

I assume that there’s some server cost for initializing all those connection, if my website gets a massive traffic spike, it would bring down my website.

You probably know better than me.

For a static page that has static links in it, nginx is the way to go. This would mean not using Meteor resources whatsoever.

IMHO, any static page should be served by nginx. This ensures much less resource usage and pages opening faster (this last part alsos depends on the HTML being served but I’m sure you get what I’m talking about).

I would use the admin pages to create the HTML, sitemap, etc; and serve the CMS from nginx.

Why nginx instead of a proxy cache?

If I have a static server it means I have to implement a separate step that generates a static site, which seems pointless.

I’m not an expert on proxy caching, but can easily configure nginx, hence nginx :slightly_smiling:

Also, nginx has proxy caching abilities in the form a module that you enable and configure, with 3 lines. Never needed it so far, but it’s there. So, nginx is also a proxy cache. :slightly_smiling:

1 Like

That’s cool, good to know. :slightly_smiling:

I’m looking for simplicity, generating html files, while doable, is not ideal.