Skip to content

[P1] Deploy Global Edge Infrastructure for Low-Latency API Access #84

@BlocksScanIO

Description

@BlocksScanIO

Feature Request: Global Edge Infrastructure

Background

Competitor Analysis Reference: Chainstack Global Nodes, QuickNode Multi-Cloud

Chainstack and QuickNode provide globally distributed, geo-load-balanced infrastructure. XDC Gateway needs edge nodes to serve global users with low latency.

Requirements

Geographic Distribution

Target regions for edge deployment:

Region Location Priority
Asia-Pacific Singapore P0
Asia-Pacific Tokyo P0
Asia-Pacific Mumbai P1
Europe Frankfurt P0
Europe London P1
North America Virginia P0
North America California P1
Middle East Dubai P2
South America São Paulo P2

Architecture

                        ┌─────────────────┐
                        │   Global DNS    │
                        │  (Geo-Routing)  │
                        └────────┬────────┘
                                 │
            ┌────────────────────┼────────────────────┐
            │                    │                    │
            ▼                    ▼                    ▼
    ┌───────────────┐    ┌───────────────┐    ┌───────────────┐
    │  Edge Node    │    │  Edge Node    │    │  Edge Node    │
    │  Singapore    │    │  Frankfurt    │    │  Virginia     │
    │               │    │               │    │               │
    │ ┌───────────┐ │    │ ┌───────────┐ │    │ ┌───────────┐ │
    │ │ API GW    │ │    │ │ API GW    │ │    │ │ API GW    │ │
    │ │ Cache     │ │    │ │ Cache     │ │    │ │ Cache     │ │
    │ │ WebSocket │ │    │ │ WebSocket │ │    │ │ WebSocket │ │
    │ └───────────┘ │    │ └───────────┘ │    │ └───────────┘ │
    └───────┬───────┘    └───────┬───────┘    └───────┬───────┘
            │                    │                    │
            └────────────────────┼────────────────────┘
                                 │
                    ┌────────────┴────────────┐
                    │     Core Cluster        │
                    │  (XDC Nodes + Indexers) │
                    └─────────────────────────┘

Components

1. Edge API Gateway

# Kong/AWS API Gateway configuration
services:
  - name: xdc-rpc
    url: http://core-cluster:8545
    routes:
      - name: rpc-route
        paths: ["/rpc"]
    plugins:
      - name: rate-limiting
        config:
          minute: 1000
      - name: caching
        config:
          ttl: 60

2. Redis Edge Cache

type EdgeCache struct {
    client *redis.Client
    ttl    time.Duration
}

func (c *EdgeCache) GetBlock(number uint64) (*Block, error) {
    key := fmt.Sprintf("block:%d", number)
    // Try edge cache first
    // Fall back to origin if miss
}

3. Geo-DNS Configuration

; Route users to nearest edge
$ORIGIN gateway.xdc.network.

; Asia-Pacific
ap.gateway.xdc.network.  IN CNAME  singapore.edge.xdc.network.
sg.gateway.xdc.network.  IN CNAME  singapore.edge.xdc.network.
jp.gateway.xdc.network.  IN CNAME  tokyo.edge.xdc.network.

; Europe
eu.gateway.xdc.network.  IN CNAME  frankfurt.edge.xdc.network.

; Americas
us.gateway.xdc.network.  IN CNAME  virginia.edge.xdc.network.
na.gateway.xdc.network.  IN CNAME  virginia.edge.xdc.network.

Performance Targets

Metric Target Current (Est.)
API Latency (p50) <50ms <200ms
API Latency (p99) <100ms <500ms
WebSocket Latency <30ms N/A
Cache Hit Rate >80% N/A
Uptime 99.99% 99.9%

Implementation Phases

Phase 1: Core Edge (Weeks 1-4)

  • Deploy Singapore and Frankfurt edge nodes
  • Configure Geo-DNS routing
  • Implement Redis caching layer
  • Load balancer setup

Phase 2: US Expansion (Weeks 5-6)

  • Deploy Virginia edge node
  • Add US-West (California)
  • Cross-region replication

Phase 3: Optimization (Weeks 7-8)

  • Cache warming strategies
  • Smart routing algorithms
  • DDoS protection
  • WAF implementation

Monitoring & Observability

# Prometheus metrics
metrics:
  - edge_request_duration_seconds
  - edge_cache_hit_ratio
  - edge_active_connections
  - edge_bandwidth_bytes
  - origin_latency_seconds

Security

  • DDoS protection (Cloudflare/AWS Shield)
  • Rate limiting per IP/API key
  • WAF rules for common attacks
  • TLS 1.3 enforcement
  • Origin shielding

Cost Estimation

Component Monthly Cost
Edge Nodes (3 regions) $1,500
Bandwidth $500
DNS/Load Balancer $200
DDoS Protection $300
Total ~$2,500/month

Acceptance Criteria

  • Edge nodes in 3+ regions
  • Geo-DNS routing active
  • <100ms p99 latency from all regions
  • 99.99% uptime SLA
  • Cache hit rate >80%
  • DDoS protection active

Competitor Comparison

Feature Chainstack QuickNode XDC Gateway (Target)
Global Nodes 🔄 Planned
Geo-Routing
Edge Caching
DDoS Protection
Regions 10+ 15+ 5+

References

Priority: P1 - Critical for global user experience
Estimated Effort: 8 weeks
Labels: enhancement, infrastructure, P1, edge

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions