Skip to content

Network presence push writes to one shared global table #310

Description

@josephfusco

#299 replaces the per-request UNION across each site's presence table with a push model: each site upserts its online-user row into one shared global table (wp_presence_network_summary), keyed by blog_id.

The write is coalesced, so a tick that finds the same people online is a zero-row no-op and the row is only rewritten when the user set changes or the row goes stale (TTL minus the idle heartbeat interval, 15s at the defaults). That bounds the rate but not the concentration.

Per-site tables can be split across database shards on a large network. A global table can't be split the same way, so every site's write still lands on one table instead of its own shard.

Does that write concentration hold up at large-network scale, or does the write path need to stay shardable?

PR: #299

Metadata

Metadata

Assignees

Labels

Needs DiscussionAnything that needs a discussion/agreementPerformanceWork relates to query load, cache behavior, or scaling[Area] DatabaseIssues for the wp_presence table and cron cleanup

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions