Skip to content

Instantly share code, notes, and snippets.

@azell
Last active June 16, 2026 06:13
Show Gist options
  • Select an option

  • Save azell/972098c14778e457ba058ad1300ca881 to your computer and use it in GitHub Desktop.

Select an option

Save azell/972098c14778e457ba058ad1300ca881 to your computer and use it in GitHub Desktop.
flowchart TD
    WC[Web client]
    MC[Mobile client]

    WC --> CTA
    MC --> CTA

    CTA["CTA service
    4,000 req/s · 250 ms budget · direct from clients"]

    CTA --> GQL

    GQL["Apollo GraphQL router
    Routes to CTA content services"]

    GQL -->|Synchronous HTTP/gRPC| PRO
    GQL -->|Synchronous HTTP/gRPC| REC
    GQL -->|Synchronous HTTP/gRPC| LRN
    GQL -->|Synchronous HTTP/gRPC| ONB

    PRO["Promotions
    CTA content service"]
    REC["Recommendations
    CTA content service"]
    LRN["Learning
    CTA content service"]
    ONB["Onboarding
    CTA content service"]

    PRO --> PRO_DB[("Postgres
    Promotions DB")]
    REC --> REC_DB[("DynamoDB
    Recs DB")]
    LRN --> LRN_DB[("Postgres
    Learning DB")]
    ONB --> ONB_DB[("DynamoDB
    Onboarding DB")]
Loading
flowchart TD
    WC[Web client]
    MC[Mobile client]

    WC --> CTA
    MC --> CTA

    CTA["CTA service
    4,000 req/s · 250 ms budget · direct from clients"]

    CTA --> GQL

    GQL["Apollo GraphQL router
    Routes requests — used at both layers"]

    GQL --> ORCH

    ORCH["CTA content orchestrator
    Aggregates per-user personalization · exposes API"]

    ORCH --- DDB_PERS[("DynamoDB
    Personalization")]

    ORCH -.->|publishes| KAFKA

    ORCH -.->|via router| GQL

    GQL -->|Synchronous HTTP/gRPC| PRO
    GQL -->|Synchronous HTTP/gRPC| REC
    GQL -->|Synchronous HTTP/gRPC| LRN
    GQL -->|Synchronous HTTP/gRPC| ONB

    PRO["Promotions
    CTA content"]
    REC["Recs
    CTA content"]
    LRN["Learning
    CTA content"]
    ONB["Onboarding
    CTA content"]

    PRO -.->|personalization API| DDB_PERS
    REC -.->|personalization API| DDB_PERS
    LRN -.->|personalization API| DDB_PERS
    ONB -.->|personalization API| DDB_PERS

    PRO --> PRO_DB[("Postgres
    Promotions DB")]
    REC --> REC_DB[("DynamoDB
    Recs DB")]
    LRN --> LRN_DB[("Postgres
    Learning DB")]
    ONB --> ONB_DB[("DynamoDB
    Onboarding DB")]

    KAFKA["Kafka
    Event stream"]

    KAFKA --> DBX

    DBX["Databricks
    Analytics & ML"]
Loading

flowchart LR
    subgraph Microservices
        ML["ML microservice
        Publishes ML events"]
        LEADS["Leads microservice
        Publishes lead events"]
        CREDIT["Credit Reports
        Publishes credit events"]
    end

    subgraph Kafka Topics
        KML["Kafka
        ML events topic"]
        KLEADS["Kafka
        Leads topic"]
        KCREDIT["Kafka
        Credit reports topic"]
    end

    ML -.->|async| KML
    LEADS -.->|async| KLEADS
    CREDIT -.->|async| KCREDIT

    KML -.->|consumes| CONSUMER
    KLEADS -.->|consumes| CONSUMER
    KCREDIT -.->|consumes| CONSUMER

    CONSUMER["Orchestrator consumer
    Async · updates personalization"]

    CONSUMER --> DDB

    DDB[("DynamoDB
    Personalization")]
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment