Enable Leader Election ΒΆ

This guide will show you how to enable leader election for your application.

Enable leader election in manifest ΒΆ

.nais/app.yaml

yaml

Using leader election in your application (simple API) ΒΆ

java
bash
python
typescript

Using leader election in your application (Server Sent Events API) ΒΆ

πŸ‘· Help Wanted! Please contribute with examples on how to use the Server Sent Events API.

WebFlux to create a subscription, and an ApplicationEvent to inform about changes.

kotlin

Using sseclient to subscribe to the leader election events, and passing them to a handler function. Probably needs to be run in a separate thread.

python