Deploy SolidStart with cluster?

I've completed development with SolidStart. Currently, I need to deploy it to my vps. So I'm wondering about performance and want to deploy solid-start application with cluster mode. I've to trying the nitro preset for node-cluster with full app.config.ts
import { defineConfig } from "@solidjs/start/config";
import tailwindcss from "@tailwindcss/vite";

export default defineConfig({
vite: {
plugins: [...(tailwindcss() as any)],
},
server: {
prerender: {
routes: ["/"],
},
preset: "node-cluster",
},
});
import { defineConfig } from "@solidjs/start/config";
import tailwindcss from "@tailwindcss/vite";

export default defineConfig({
vite: {
plugins: [...(tailwindcss() as any)],
},
server: {
prerender: {
routes: ["/"],
},
preset: "node-cluster",
},
});
It seems it work as normal when I try pnpm start
pnpm start

> store-front@ start C:\vggroup\store-front
> vinxi start

Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
pnpm start

> store-front@ start C:\vggroup\store-front
> vinxi start

Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
Listening on http://0.0.0.0:3000
My question is do I did good practice or does solid-start can run in cluster mode for better performance?
4 Replies
Brendonovich
Brendonovich6d ago
This should be alright since it's supported by Nitro
quangnguyen1311
quangnguyen1311OP6d ago
Great, but the first question is does it good practice for meta frameworks(solid-start, nextjs, nuxtjs)
Brendonovich
Brendonovich6d ago
I'm not sure, but it's not that different from running pnpm start multiple times on the same machine Serverless providers like Vercel and Netlify are kinda like big clusters anyway haha, just multiple machines instead of multiple processes
quangnguyen1311
quangnguyen1311OP6d ago
It seems all cluster will sharing resources in the public folder in runtime. Hope it not caused any critical issues. However, I'll keep this conversation to get experience of someone have knowledge about cluster mode(pros, cons).

Did you find this page helpful?