Skip to content

Content Synchronization Pipeline

intermediate
📜CoreGraphcms

Optimizely Graph serves content through a search-optimized index, not directly from the CMS database. For frontends to receive up-to-date content, every publish action in the CMS must propagate to the Graph index. The synchronization pipeline handles this automatically, keeping the two systems in sync with minimal delay.

Understanding this pipeline helps you diagnose delivery delays, plan for content volume, and build reactive frontends that respond to content changes.

The pipeline follows a publish-subscribe pattern. When an author publishes, unpublishes, or deletes content in the CMS, the system generates a sync event. Graph consumes that event and updates its index accordingly.

The flow:

  1. Author action — A page is published, updated, or deleted in CMS
  2. CMS emits sync event — The CMS packages the content item with all its properties, metadata, and relationships
  3. Graph receives the payload — The sync service validates the payload against the current schema
  4. Index update — Graph writes the content into its search-optimized store
  5. Content becomes queryable — Frontend applications receive the updated content on their next query

This process completes in seconds under normal conditions. Most content changes become queryable within 2-5 seconds of publishing.

Graph indexes every published content item that matches the configured content types. This includes:

  • Property values — All content type properties (strings, numbers, dates, rich text, content areas)
  • Metadata — Publication dates, status, locale, content GUID, URL slugs
  • Relationships — Content references, content area items, linked content
  • Binary metadata — File names, sizes, and MIME types for media (not the binary data itself)
  • Ancestry — Parent-child relationships in the content tree

Rich text fields are indexed both as structured HTML and as plain text for full-text search.

The pipeline supports two synchronization modes:

ModeTriggerScopeDuration
IncrementalContent publish/unpublish/deleteSingle item + dependenciesSeconds
Full syncManual trigger or schema changeAll published contentMinutes to hours

Incremental sync is the default for everyday publishing. Full sync rebuilds the entire index and is necessary after schema changes, data migrations, or when recovering from sync errors.

Graph can notify external systems when content changes occur. Webhooks fire after the index update completes, so the notified system can immediately query for the updated content.

Webhook payload structure
json
{
  "type": "content/updated",
  "timestamp": "2026-03-25T14:30:00Z",
  "source": "optimizely-graph",
  "data": {
    "contentKey": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "contentType": "ArticlePage",
    "locale": "en",
    "action": "published",
    "url": "/articles/getting-started"
  }
}

Common webhook use cases:

  • Static site rebuilds — Trigger a Next.js or Gatsby rebuild when content changes
  • Cache invalidation — Purge CDN caches for updated pages
  • Notification systems — Alert teams when specific content types are updated
  • Search index warming — Pre-fetch updated content for client-side search

See Set Up Webhooks for configuration steps.

Several scenarios require a manual resync:

  • Schema changes — Adding or removing content type properties that affect the Graph schema
  • Bulk content imports — Loading large volumes of content outside the normal editorial workflow
  • Index corruption — Rare cases where the index diverges from the CMS source of truth
  • Environment provisioning — Setting up a new Graph environment against an existing CMS
Trigger a full resync via API
bash
curl -X POST \
  https://cg.optimizely.com/api/content/v3/sync \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Basic {base64(AppKey:Secret)}' \
  -d '{"action": "full"}'

Monitor sync health through the Graph admin API. The status endpoint returns the current sync state, last sync timestamp, and any pending items.

SymptomLikely causeResolution
Content not appearingSync event not firedVerify content status is Published, not Draft
Stale content after publishIncremental sync delayedCheck Graph service health; wait 30 seconds and retry
Missing propertiesSchema out of dateTrigger a full resync after content type changes
Partial content treeFull sync interruptedRe-trigger the full sync job

Sync latency expectations — Plan for 2-5 second delays between publishing and queryability. Do not build frontends that assume instant consistency. Use webhooks to know when content is ready.

Content volume planning — Full resyncs scale linearly with content volume. A site with 10,000 content items may take 5-10 minutes for a full resync. Plan maintenance windows accordingly.

Multi-environment sync — Each Graph environment maintains its own index. Content synced to a staging Graph instance does not automatically appear in production. Promote content through your standard deployment pipeline.