Skip to content

[feature] Allow publish only API via HTTP (/1.1, /2, /3) for clients #1115

@mbuptivo

Description

@mbuptivo

Hi. In my scenario, I have many publishers sending fire-and-forget updates to specific channels from wearables (in particular, Apple Watch) every few seconds. They simply publish to a channel without requiring any subscription. Subscribers, instead, are more capable clients leveraging WebSockets, and they are fewer in number.
In this case, the suggested way to send data is to POST directly (leveraging HTTP/2 or HTTP/3 via URLSession on Apple Watch).

The publish API would be perfect for my use case, but I’m not comfortable with the fact that the only authentication option is an API key.

The only workaround I’ve found so far is to have clients POST to the backend, and then have the backend post to Centrifugo. However, this approach has drawbacks: the backend must scale as Centrifugo usage grows, and it introduces additional costs and complexity.

I understand that APIs are generally expected to be used by backends, but a client-facing POST endpoint with JWT authentication would be perfect for my use case.

Thanks!

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