Photon Realtime rejoin during client rollout: actor slots not guaranteed across old and new builds
0 reputation · 08 Jun 2020, 14:23 UTC
0 reputation · 08 Jun 2020, 14:23 UTC
I'm planning a zero-downtime migration for a small realtime app on Photon Engine. The current plan is to keep one Photon Cloud App ID so old and new client builds share the same rooms, and rely on PlayerTTL/EmptyRoomTTL plus rejoin with the same user ID so disconnected players resume their actor slot instead of re-entering as new actors.
The uncertainty is twofold. First, I don't know how long the rejoin window realistically stays valid for my setup — the TTL bounds appear to depend on configuration and possibly plan, and I can't assume an indefinite window. Second, the new build changes some event payloads, and I'm unsure what actually happens inside a shared room when an old client receives an event code or serialized format it doesn't recognize: silent drop, exception, or room-level failure.
There's also an unresolved hosting decision: stay on Photon Cloud, or move to self-hosted Photon Server for custom logic, knowing that server-side upgrades there seem to require draining rooms or accepting brief disconnects.
1. What is the documented behavior when a rejoin attempt arrives after PlayerTTL has expired — new actor, error, or room rejection?
2. How do mixed client builds behave in one room when event formats differ?
3. Given these constraints, what criteria should decide Cloud vs. self-hosted for this migration?
When a rejoin attempt arrives after PlayerTTL has expired, the server no longer holds an inactive actor entry for that user. The client is therefore admitted as a new actor: it receives a new ActorNumber, and any state tied to the previous actor slot is lost. This is not an error or a room rejection — the join succeeds, just without slot continuity. Separately, if the room became empty and EmptyRoomTTL also expired, the room itself is destroyed, so the same UserID may end up creating or joining a different room instance entirely.
Exact TTL defaults and limits vary by Photon product, plan, and configuration, so do not design around an indefinite rejoin window. Verify your actual values in the Photon dashboard for your App ID.
Photon Realtime is a transport layer: it delivers an event code plus payload to every subscribed client and does not enforce a shared schema between builds. Practical behavior with old and new builds in one room:
For a zero-downtime rollout, keep wire compatibility: reserve new event codes for new features, add fields instead of renaming or retyping them, and gate new events behind a room property or version check.
| Criteria | Photon Cloud | Self-Hosted Server |
|---|---|---|
| Actor continuity | Fixed TTL behavior; no slot persistence beyond config. | Plugins can implement custom rejoin/admission logic. |
| Version gating | Client-side checks or room properties only. | Server-side plugins can reject outdated builds at join. |
| Operations | Managed scaling, no server maintenance. | You own upgrades; expect room draining or brief disconnects. |
Stay on Cloud if managed operations matter more than custom logic. Move to self-hosted only if you need authoritative plugins, custom admission rules, or controlled draining — and accept the upgrade burden.
PlayerTTL, disconnect, wait past expiry, and rejoin with the same UserID; log whether the ActorNumber is restored or reassigned.One diagnostic detail that changes the recommendation: are you serializing with Photon's native types or a custom library (Protobuf, MessagePack)? That determines whether payload mismatches fail silently or throw, and therefore how strict your version gating must be.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.