Subscribe on changes!

Server performance degrades as more concurrent users hit an SSR-ed Vue app

avatar
Feb 23rd 2024

Vue version

3.4.19

Link to minimal reproduction

https://github.com/prashantpalikhe/vue-ssr-perf-showcase

Steps to reproduce

In the reproduction repo

What is expected?

Server response time should stay as close to the app render time when the number of concurrent users increases.

What is actually happening?

App render time stays low. But the server response time increases dramatically as the number of concurrent users increases.

System Info

System:
    OS: macOS 14.3.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 16.82 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.5.1 - ~/.nvm/versions/node/v20.5.1/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 9.8.0 - ~/.nvm/versions/node/v20.5.1/bin/npm
    pnpm: 8.10.2 - ~/.nvm/versions/node/v20.5.1/bin/pnpm
    bun: 1.0.22 - ~/.bun/bin/bun
  Browsers:
    Chrome: 122.0.6261.57
    Chrome Canary: 124.0.6315.0
    Safari: 17.3.1
  npmPackages:
    vue: ^3.4.19 => 3.4.19

Any additional comments?

No response

avatar
Feb 23rd 2024

CleanShot 2024-02-23 at 11 38 05@2x

avatar
Feb 23rd 2024

Give @fastify/vite a try, referencing the example at @fastify/vue.

$ pnpm dlx degit fastify/fastify-vite/starters/vue-base vue-fastify-ssr
$ cd vue-fastify-ssr
$ pnpm install
$ pnpm build
$ pnpm start
avatar
Feb 23rd 2024

I will give it a try, but I have noticed the same with Nuxt where H3 is used. So I don't think, in this case, it's a server-type issue

avatar
Feb 23rd 2024

@Shyam-Chen Same with fastify-vite as well

avatar
Feb 23rd 2024

Also tried the same test (as much as I could) with Fastify Vite Vanilla React as well. There the problem is far lesser compared with Vue.