Spread Graph API calls evenly: pace a nightly Reel batch

Meta advises spreading queries evenly to avoid traffic spikes. Space publish calls across the hour, and size the Sume render wave from generation_limits.

5 min readSume
All posts

Meta's Graph API guidance for staying under its limits includes spreading queries evenly to avoid traffic spikes, and its call_count is measured over a rolling hour. For a nightly Reel batch, divide the hour by the number of publish calls and sleep between them, instead of firing the whole batch the moment renders finish.

Pace the render side separately: Sume reports generation_limits on submit responses, and its docs describe wave_size_hint as a submission-wave hint, not a concurrency limit.

Two budgets, two pacers

Keep the render pacer and the publish pacer independent.

What paces each stage (read 2026-10-05)
StageSignalSource
Render on Sumegeneration_limits.queue_capacity_remaining, wave_size_hintSume generation admission docs
Publish to InstagramPosts limited to 100 API-published per 24-hour moving periodMeta content publishing page
Graph callsX-App-Usage call_count over a rolling hourMeta rate limiting page

How do I space the calls?

Compute the gap once, then sleep. The sample spaces a list of items across a window.

import time


def spaced(items: list, window_seconds: int):
    gap = window_seconds / max(1, len(items))
    for index, item in enumerate(items):
        if index:
            time.sleep(gap)
        yield item


if __name__ == "__main__":
    for job_id in spaced(["job_a", "job_b", "job_c"], window_seconds=3):
        print("publish", job_id)

What about the render wave?

Do not size in-flight Sume work from wave_size_hint; use the effective concurrency_limit minus active and queued jobs, capped by queue_capacity_remaining (Generation admission). The post on pacing bulk Sume submits has the full loop.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume