Skip to content

Expose UWS_HTTP_MAX_HEADERS_SIZE for high-traffic gaming applications #1179

@Mistik

Description

@Mistik

Feature Request: Expose HTTP Max Headers Size Configuration

Problem

We're migrating mope.io (a high-traffic browser game) to uWebSockets.js for better performance, but we're hitting header size limits due to a required large cookie.

Use Case

  • Application: mope.io - a popular browser-based multiplayer game
  • Traffic: High-volume real-time gaming traffic
  • Issue: We have a required cookie FCCDCF (up to 3KB) mandated by premium advertising partners
  • Impact: Players can't connect when this cookie is present due to header size limits

Current Situation

  • Migration to uWS.js has been excellent for performance
  • Everything works perfectly except for this header size limitation
  • The cookie cannot be removed or significantly reduced

Proposed Solution

Expose the existing C++ UWS_HTTP_MAX_HEADERS_SIZE configuration in the JavaScript bindings:

const app = uWS.App({
  maxHeaderSize: 16384, // 16KB to handle large cookies
  // ... other options
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions