expressjs / expressjs/express

How to hold a response? And are there something called "maxHeldResponseCount"?

Open
#4,889 1 comment 0 reactions 0 assignees View on GitHub
awaiting more info
Dominant language
JavaScript
Stars
69.5k
Forks
25k
Avg merge
4d 20h
Merged PRs (30d)
9

Description

1. I want to implement a long-polling model in my server (express.app).
2. I use a map to stored incoming response, waiting (about 60 seconds later) another request to finally send stored response back.
3. I find the store action will block other incoming request. I mean, the callback of `app.post("xxx"...)` is not called until I close some of stored responses in step 2.

So, I wonder:

1. Is it a right method for me to store response from `app.post` to implement long-polling?
2. Does express.js itself set max concurrent count of held responses?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.