← Back to search

Enterprise iMessage API at Scale: How Photon Handles 10M+ Messages a Day

The Good Tech Companies · 2026-08-26 · 22 min
relevance 60 3244 words Episode page ↗ Audio ↗
Show full episode description
This story was originally published on HackerNoon at: https://hackernoon.com/enterprise-imessage-api-at-scale-how-photon-handles-10m-messages-a-day . Photon handles 10M+ iMessage API calls a day for teams like Rho and Vercel — built on protocol-native delivery, an open-source macOS fleet manager, and AWS EKS. Check more stories related to undefined at: https://hackernoon.com/c/undefined . You can also check exclusive content about #photon-imessage-api , #imessage , #enterprise-ai , #enterprise-api-strategy , #enterprise-imessage , #imessage-api , #imessage-api-at-scale , #good-company , and more. This story was written by: @photonhq . Learn more about this writer by checking @photonhq's about page, and for more stories, please visit hackernoon.com . Photon processes 10M+ iMessage API calls a day for companies like Rho, Vercel, Hermes Agent, Ditto, and FlipText — matching Apple's own uptime and feature coverage. It does it not with a fragile Mac-bridge, but through three layers: protocol-native Apple communication, Astrolabe (an open-source macOS fleet manager), and enterprise cloud routing on AWS EKS.
✨ Episode Outline — click any point to jump to it in the episode
Problem solved
Building a reliable enterprise iMessage API means solving infrastructure problems — Mac fleet health, routing, failover, and durable event delivery — not just exposing an endpoint.
Benefits
  • Protocol-native iMessage removes dependencies on Messages app UI and local SQLite database
  • Astrolabe continuously reconciles macOS fleet state, auto-recovering drifted or failed nodes
  • Health-aware line routing and auto-scaling prevent overloaded iMessage lines
  • Durable Postgres event log enables replay of missed events on client reconnect
  • Distributed tracing and delivery cursors make every delivery path observable
Use cases
  • Photon's shared-number infrastructure processes 10M+ iMessages per day in production
  • Powers messaging for Rho, Vercel, Hermes Agent, Ditto, Fi, and Fliptext
  • Routing marks a line as fallback above 500 active users or +10 users/minute growth
  • Rebuilt fan-out routing into a durable event pipeline resolving ownership once at ingest
  • Fixed a production bug where transient upstream failures were cached as permanent ineligibility
KPIs / results
  • 10M+ iMessages processed per day on shared-number infrastructure
  • Fallback threshold: >500 active users per line or >10 new users/minute
  • Three-layer architecture: protocol-native messaging, Astrolabe fleet management, cloud routing on AWS EKS
Tools / build
  • Photon iMessage API
  • Astrolabe open-source macOS fleet management (Swift)
  • Postgres-backed durable event log with replay
  • Auto-scaling line routing and load balancer
  • AWS EKS production infrastructure
0:00 / 0:00
This audio is presented by HackerNoon, where anyone can learn anything about any technology. Enterprise iMessage API at Scale How Photon Handles 10M Plus Messages a Day By Photon, Photon's iMessage API processes more than 10 million iMessages per day across production infrastructure used by teams including Rho, Vercel, Hermes Agent, Ditto, Fi, and Fliptext. At that volume, building a reliable iMessage API is not mainly about exposing an endpoint. The hard problems are underneath it, maintaining healthy messaging infrastructure, routing traffic across lines and relay nodes, recovering from failures, surviving operating system changes, scaling capacity, and making every delivery path observable when something goes wrong. Photon's enterprise iMessage infrastructure is built around three layers. 1. Protocol Native iMessage Communication Instead of treating the Messages app and its local database as the API surface. 2. Astrolabe, Photon's open-source macOS fleet management system, which continuously reconciles the state of the Macs supporting the relay fleet. 3. Cloud Routing, Load Balancing, Failover, and Durable Event Delivery, including production infrastructure running on a WSEKS. The result is an iMessage API architecture designed to scale from early production workloads to millions of messages without making individual Macs, bridge processes, or routing replicas the center of the system. 4. What makes an enterprise iMessage API reliable at scale? A production iMessage API has to solve more than message sending. At enterprise scale, reliability depends on several systems working together. How does the provider communicate with iMessage? 5. What happens when a Mac, process, relay, or connection fails? 6. How is traffic distributed when one iMessage line becomes saturated? 7. Can degraded infrastructure be removed from the delivery path automatically? 8. What happens when a client disconnects and needs missed events replayed? 9. Can engineers trace a delayed or missing message across the complete delivery path? 10. Can new capacity be added without changing the application's architecture? 10. Photon treats those as infrastructure problems rather than problems every developer should have to rebuild. A simplified comparison looks like this. 10. Capability, Typical App-Level Mac Bridge Photon Managed Architecture Primary Integration Layer Messages App and Local MacOS State iMessage Protocol Dependency on Messages UI Behavior Higher Reduced Dependency on Local Messages Database Common Not the Core Delivery Interface Mac Fleet Configuration Usually managed separately Astrolabe Continuous Reconciliation Multi-Line Routing Application Provider-specific Managed Routing API Capacity Management Manually Provision or Build Orchestration Auto Scaling and Managed Line Routing Failed, Degraded Relay Handling Implementation Specific Health Aware Routing and Recovery Infrastructure Missed Inbound Event Recovery Implementation Specific Durable, Replayable Event Log Delivery Observability Varies Distributed Tracing, Logs, Delivery State, and Fleet Health Production Scaling Requires Operating the underlying fleet Managed Infrastructure and Dedicated Lines Available The difference is not that Mac Bridges cannot send iMessages. They can. The difference appears when iMessage becomes part of a production product and needs to work continuously across growing traffic, infrastructure failures, deployments, and operating system changes. Why Mac-based iMessage Bridges Become Fragile at Scale If you have evaluated iMessage API providers or tried to build one yourself, you have probably encountered a Mac Bridge Architecture. A common implementation resembles a Blue Bubble-style approach. Software runs on a Mac, interacts with the local messages environment, reads local state such as the Messages database, and forwards events to an application through REST endpoints or WebSockets. For a personal project or prototype, this can be perfectly reasonable. Production changes the problem. Mac OS becomes part of your messaging In-F-R-A-S-T-R-U-C-T-U-R-E-A Bridge that depends on messages. App behavior, local database structures, automation APIs, or Mac OS permissions inherits changes to those layers. An operating system change can therefore become a messaging infrastructure change even when the underlying iMessage network itself is functioning normally. Long-running processes become failure PoinTSA bridge process needs to remain healthy indefinitely. Process crashes, memory pressure, broken connections, configuration drift, and machine-level problems can interrupt message delivery unless another layer detects and repairs them. Headless Macs at Operational Complexity Mac OS protects resources through permissions such as full disk access, accessibility, and automation. Managing those permissions on one development Mac is straightforward. Managing a fleet of remote Macs responsible for a production messaging product is an infrastructure problem. Identity and Capacity become operational PROBLEMSA hobby project can start with one Apple account and one machine. A high-volume iMessage API needs a repeatable approach to phone numbers, identities, provisioning, line health, user assignment, capacity, monitoring, and failure recovery. At enterprise scale, the important question is no longer. Greater than can this architecture send an iMessage? It is. Greater than can this architecture keep sending and receiving iMessages reliably as traffic greater than an infrastructure complexity increase? How does protocol-native iMessage improve reliability? Photon does not use the Messages app as the core API surface for its Managidi message infrastructure. Instead, Photon communicates with the underlying iMessage protocol. That distinction removes several application-level dependencies from the core delivery path. Photon does not need the Messages UI to remain unchanged. It does not use the local Messages SqLite database as the primary event interface. And a redesign of the Messages application does not automatically imply our design of Photon's core messaging protocol implementation. That does not mean Photon has no independent failure modes. Routing software, networking, databases, relay infrastructure, capacity, and cloud services still have to operate correctly. What protocol-native communication does is remove an important category of app-level dependencies and let Photon build reliability around the infrastructure it controls. Photon's managed iMessage API exposes native messaging capabilities including direct messages, group chats, reactions, replies, attachments, typing indicators, location sharing, polls, rich media, and newer iMessage experiences such as mini-apps. The current feature set is available on the Photon iMessage API page. For enterprise workloads, protocol-native communication is therefore the first layer. The second layer is keeping the machines supporting that infrastructure healthy. How does Photon operate its macOS fleet? Photon built Astrolabe to manage the macOS systems behind its infrastructure. Astrolabe is an open-source, declarative macOS fleet management framework written in Swift. Instead of configuring a machine once and assuming it remains healthy, Astrolabe continuously compares the live state of a Mac with the state Photon declared for it. If a package disappears, a daemon stops running, or a system configuration drifts. Astrolabe can reconcile that machine back toward the desired state on a subsequent pass. That gives Photon several concrete fleet management properties. Continuous configuration reconciliation Astrolabe treats fleet configuration as an ongoing desired state rather than a one-time setup script. The system runs as a root launch daemon and repeatedly reconciles the machine against its declared configuration. Process and surface recovery long-running infrastructure depends on long-running processes. Astrolabe can declare launch daemons with health and lifecycle behavior so the system can keep required services running rather than discovering a stopped process only after customers report missing messages. Configuration as code fleet configuration is written in Swift, versioned in Git, reviewed through normal development workflows, and deployed as infrastructure code. That gives Photon a reproducible way to configure machines instead of relying on one-off manual state. Fleet-wide operational consistency The goal is not merely to determine whether an individual Mac is online. The goal is to make the fleet behave like infrastructure. Machines can be updated, repaired, rotated, and returned to the desired state without making one specific node responsible for overall service availability. Astrolabe is open source, so the mechanism behind this layer is inspectable rather than hidden behind an enterprise marketing page. How does Photon load balance iMessage traffic at scale? Healthy Macs are only one part of a scalable iMessage API. Traffic also has to reach the correct healthy line and relay infrastructure. Photon has built dedicated auto-scaling and load balancing infrastructure for iMessage. Instead of requiring an application to provision lines manually and write its own routing logic, Photon exposes a routing endpoint that selects an available iMessage line for a new user. The routing system evaluates line capacity using signals such as active user count and recent growth. Photon's current routing implementation can explicitly signal when no line is within the preferred health thresholds. For example, a returned line may be marked as a fallback when it has more than 500 active users or grown by more than 10 users within the previous minute. That allows the application to make an explicit decision. Assign the fallback line. Cue the user. Provision additional capacity or alert the team. For a high-volume iMessage API, this matters because scaling is not simply adding more servers. Capacity exists across phone numbers, relay infrastructure, conversations, and routing state. Photon treats those resources as part of one managed routing system. How does Photon route more than 10 m iMessages per day? The shared number portion of Photon's iMessage infrastructure alone processes more than 10 million messages per day. At that scale, Photon found that its original fan-out routing model was no longer reliable enough. Every inbound event required the system to determine which project owned the conversation, find the correct client stream, and deliver the event. The old architecture repeatedly re-derived that ownership from live relay state. At small scale, that was manageable. At more than 10 million messages per day, every repeated resolution became another opportunity for inconsistent state, added latency, lost observability, or a dropped message. Photon rebuilt that path around a durable event pipeline. Resolve ownership once instead of repeatedly determining ownership throughout the delivery path. The current system resolves ownership when the event enters the system. Persist inbound events Resolved events are written to a durable Postgres-backed event log. That means downstream systems can read known state instead of repeated liar constructing it from live infrastructure. Replay missed events from durable state when a client reconnects and needs messages it missed. Catch up reads from the event log rather than replaying live relay state. Separate ingest from SUBSCRIBERSA shared tailing system distributes persisted events to connected subscribers through bounded queues. A stalled consumer becomes an explicit backpressure condition instead of silently holding the system indefinitely. Make delivery state observable watermarks, delivery cursors, tracing, and stored events give Photon concrete signals about where an event is in the delivery path. That is important because one of the hardest messaging failures to debug is the absence of an event that should have existed. Treat transient errors as transient Photon also found a production bug where a temporary upstream failure could be cached as if a user were permanently ineligible to receive messages. The fix was to distinguish 1. a positive resolution, 2. a definitive negative resolution, 3. and a transient infrastructure error that should be retried rather than cached. That is the type of failure mode that tends to appear only when an API is operating continuously at production volume. The rebuilt shared service is now based around durable state, explicit retry behavior, and end-to-end observability rather than repeatedly deriving delivery state from the live fleet. How does Photon handle relay failures and degraded capacity? Enterprise iMessage infrastructure should assume that individual components will fail. The goal is not to claim that failures are impossible. The goal is to prevent one failed component from unnecessarily becoming a customer facing outage. Photon approaches this at multiple layers. Fleet Recovery Astrolabe continuously reconciles the state of macOS nodes and their required services. Health-aware line routing new users can be routed toward healthier capacity rather than blindly assigned to an overloaded line. Capacity expansion Photon's auto-scaling system can add additional dedicated iMessage lines as utilization grows. Durable message state the shared inbound routing system stores events so client reconnection and catch-up do not depend entirely on ephemeral relay state. Observable failures Photon uses logging, distributed tracing, and delivery observability. So engineers can follow failures through the infrastructure rather than infer them from a customer saying a message never arrived. Dedicated infrastructure for business workloads. Photon's business tier provides dedicated iMessage lines, and the shared routing architecture used by free and pro accounts is not required for dedicated number business deployments. That separation matters for enterprise iMessage workloads because a business can have its own messaging identity and dedicated backend rather than sharing the same number pool and routing path used by smaller deployments. Current business and enterprise options are listed on Photon's pricing page. Production proof, iMessage infrastructure running at real scale, infrastructure diagrams are useful, production traffic is more useful. Photon processes more than 10 million iMessages per day through its shared service alone, in addition to dedicated production deployments. Teams building on Photon include Ro, which uses Photon to bring sales teams and AI agents into iMessage and phone-based customer interactions. Vercel, with Photon maintaining an iMessage adapter for the Vercel chat SDK. Hermes Agent, which uses Photon to bring an agent into iMessage without requiring the end user to operate the messaging infrastructure. Ditto, an iMessage-based matchmaking product operating across a large consumer user base. Fi, a consumer AI companion built around iMessage conversations. Fliptext, which builds messaging first product experiences through iMessage. These workloads are useful evidence because they turn reliability from an architectural claim into an operational requirement. If iMessage is the interface through which users interact with the product, message delivery is part of the product. What should an enterprise evaluate in an iMessage API? Enterprise ready, by itself, is not a useful specification. A team evaluating an enterprise iMessage API should ask concrete questions. Question why it matters how does the provider communicate with iMessage? Determines how dependent the system is on messages. App, macOS UI behavior, local databases, or private application behavior. What happens when a relay fails? A failed machine or process should have a defined detection and recovery path. How is traffic load balanced? High volume systems need a strategy for distributing users and conversations across healthy lines. How is new capacity added? Scaling should not require rebuilding application architecture every time traffic grows. Can missed events be replayed? Durable state matters when clients disconnect or delivery is interrupted. What observability exists? Engineers need traces, logs, health data, and message state to diagnose production failures. Are dedicated iMessage lines available? Larger deployments may need isolated numbers, identities, capacity, and backend infrastructure. What native iMessage features are supported? Agents may need group chats, replies, reactions, media, typing indicators, location, polls, and other native capabilities. What SLA and support model is available? Enterprise deployments need contractual expectations and escalation paths. Can the infrastructure be inspected? Open source components and technical documentation make architectural claims easier to evaluate. Photon's business and enterprise plans provide dedicated iMessage lines, unlimited user configurations, enterprise SLAs, dedicated support channels, and custom infrastructure options. The iMessage API platform page lists the currently supported messaging features and production capabilities. What does enterprise iMessage infrastructure actually require? A reliable iMessage API is not created by one technology. Protocol native communication reduces dependence on the messages application layer. Astrolabe keeps the underlying macOS fleet in a continuously reconciled state. Managed routing distributes users across available iMessage capacity. Auto-scaling adds lines as demand grows. Durable event storage allows missed events to be replayed instead of reconstructed from ephemeral state. Health-aware routing prevents every line or machine from being treated as equally healthy. Distributed tracing makes failures visible across the delivery path. Data-dedicated infrastructure isolates larger production deployments from shared number routing. Together, those layers are what make it possible to operate iMessage's production infrastructure rather than as a bridge running on one Mac. If you are building an AI agent, consumer product, or enterprise workflow where iMessage needs to keep working as usage grows, the API endpoint is only the surface. The infrastructure underneath it is the product. Explore Photon's iMessage API C Business and Enterprise Pricing Talk to Photon about Enterprise FAQ. What is an Enterprise iMessage API? An Enterprise iMessage API is an iMessage integration designed for production workloads where reliability, dedicated infrastructure, capacity management, observability, support, security, and scaling matter in addition to basic message sending and receiving. Photon provides managed iMessage infrastructure with dedicated lines, load balancing, auto-scaling, group messaging, native iMessage capabilities, and enterprise configurations. Can an iMessage API scale to millions of messages? Yes, but scaling requires more than increasing the number of application servers. iMessage capacity also depends on messaging lines, relay infrastructure, routing, identity health, event delivery, and failure recovery. Photon's shared number infrastructure currently processes more than 10 million messages per day. How does Photon scale iMessage traffic? Photon combines managed iMessage lines with auto-scaling and load balancing, macOS fleet management through astrolabe, and cloud routing infrastructure. New users can be routed toward healthier available lines based on capacity signals instead of requiring developers to implement the routing logic themselves. How does Photon differ from a BLUE-BUBB-LES-style bridge? A blue bubble-style architecture runs software around the local macOS message environment and exposes that functionality through an API or WebSocket layer. Photon's managed infrastructure communicates at the iMessage protocol layer and combines that with fleet management, routing, durable event delivery, capacity management, and production observability. Does Photon require customers to manage Macs? Not when using Photon's managed iMessage infrastructure. Photon operates the underlying infrastructure and exposes iMessage through its API. Developers who want to explore self-hosting can also use Photon's open-source tooling and Spectrum ecosystem. How does Photon load balance multiple iMessage lines? Photon exposes a managed routing API that selects an available line for a new user based on capacity signals including active user count and recent growth. The system can also indicate when the returned line is outside its preferred health thresholds, allowing the application or auto-scaling system to respond explicitly. How does Photon recover missed inbound messages? Photon's shared routing system persists resolved inbound events in a durable Postgres-backed event log. When a client reconnects, Ketchup can read previously persisted events rather than depending entirely on live relay state. What is Astrolabe? Astrolabe is Photon's open-source macOS fleet management framework. It runs continuously on managed Macs and reconciles their live configuration against a declared desired state, including packages, services, system settings, and long-running daemons. Does Photon offer dedicated iMessage infrastructure? Yes. Photon's business and enterprise plans support dedicated iMessage lines and production configurations intended for larger deployments. Which native iMessage features does Photon support? Photon's current iMessage API includes direct messaging, group messaging, rich media, replies, reactions, typing indicators, location sharing, polls, conversation customization, and iMessage mini-apps, alongside SMS, RCS fallback capabilities. Which companies use Photon for iMessage? Photon publicly features production teams including Ro, Vercel, Hermes Agent, Ditto, Fi, and Fliptext across its product and engineering materials. Related reading. How we rebuilt our shared iMessage routing to handle 10 m plus messages a day. The durable routing and event delivery architecture behind Photon's shared service. Auto scaling and load balancing for iMessage. How Photon assigns users to healthy iMessage capacity and scales lines as usage grows. Astrolabe. Managing Mac fleets at scale. The open source fleet management layer behind Photon's macOS infrastructure. Blue bubbles versus Photon. iMessage setup options. App level bridge infrastructure compared with a managed API approach. The path from blue bubbles to production iMessage agents. What changes when an iMessage agent moves from prototype to production? How to build an iMessage agent in 2026. Every approach compared, a broader comparison of ways to build on iMessage. Opt-in traces for reliable spectrum messaging, observability and tracing for production message delivery. The iMessage adapter for Vercell chat SDK, building agent experiences on top of the API. Follow Photon, X, Twitter, LinkedIn, GitHub, Discord, Instagram, start building with Photon view pricing. Contact the Photon team. Thank you for listening to this HackerNoon story. Read by artificial intelligence. Visit hackernoon.com to read, write, learn and publish.