copyright © 2026 | creaml4tt3 personal website.

Thairath Livescore (Realtime API)
Home/Projects/Thairath Livescore (Realtime API)

Thairath Livescore (Realtime API)

ThairathVisit Project
Dev PeriodFeb 2026 – Mar 2026(4 months ago)
Live SinceMar 2026(3 months ago)

This system is designed as a scalable real-time data infrastructure, aggregating data from external providers and distributing updates to thousands of concurrent users with minimal latency.

Tech Stack

TypeScriptTypeScript
RedisRedis
MongoDBMongoDB
AWSAWS

⚽ Thairath LiveScore – Real-Time API Gateway System

Developed a

high-performance real-time API gateway

powering live football data, delivering instant updates on scores, lineups, match events, and statistics across multiple leagues.


📚 Overview

This system is designed as a

scalable real-time data infrastructure

, aggregating data from external providers and distributing updates to thousands of concurrent users with minimal latency.

Key goals:

  • Handle

    high concurrency during live matches
  • Deliver

    low-latency, bandwidth-efficient updates
  • Provide

    fine-grained subscription-based data streaming

It acts as a

general-purpose real-time gateway

, not limited to sports.


🚀 Core Architecture

🔄 Data Pipeline

  • External partner APIs →

    data scraping every 15 seconds

    (rate-limited)

  • Data processed and published into

    Redis Pub/Sub
  • Messages encoded using

    MessagePack (compressed binary format)
  • Distributed to gateway pods → decompressed → streamed to clients via SSE


⚙️ Infrastructure & Scaling

  • Kubernetes-based deployment (horizontal scaling)
  • Each pod:

    • ~

      0.5 CPU (500m)

      +

      512MB RAM
    • Handles ~

      6,000+ concurrent SSE connections per pod

👉 In Kubernetes,

1
500m CPU = 0.5 CPU core

(1000m = 1 core)

  • Auto-scaling strategy

    :

    • Scale pods horizontally based on traffic

    • Maintain stable performance under heavy load


🚀 Key Features

📡 Real-Time Streaming (SSE)

  • Lightweight, persistent connection for pushing live updates

  • Optimized for high concurrency

📦 MessagePack Compression

  • Reduces payload size significantly vs JSON

  • Improves throughput and latency

🔁 Redis Pub/Sub Distribution

  • Decouples ingestion from delivery

  • Enables multi-node horizontal scaling


⚙️ Advanced System Capabilities

🧠 Auto Compare (Delta Updates)

  • Clients receive

    only changed data
  • Reduces unnecessary bandwidth usage

🧾 Version-Based Sync

  • Clients send current version → receive only diffs

  • Ensures efficient state synchronization

📡 Channel-Based Subscription

  • Fine-grained topics like:

    1
    sport-livescore/{matchId}

🌐 Wildcard Channels

  • Supports patterns:

    1
    sport-livescore/*

❤️ Auto Heartbeat

  • Sent every

    15–30 seconds
  • Keeps connection alive + detects disconnects

🚀 Initial Data Sync

  • On first connect:

    • Sends latest full state

    • Aligns user with current system version

🧩 Channel Mapping System

  • Dynamic channel creation

  • Flexible routing between publishers and subscribers


🛠️ Tech Stack

  • Backend:

    Node.js (Realtime API Gateway)

  • Realtime Layer:

    Redis (Pub/Sub)

  • Protocol:

    SSE (Server-Sent Events)

  • Data Format:

    MessagePack

  • Infrastructure:

    Kubernetes (auto-scaling pods)


👨‍💻 Responsibilities

  • Designed and built the

    entire real-time gateway architecture
  • Implemented

    data ingestion pipeline (15s scraping from partner APIs)
  • Built

    Redis-based pub/sub messaging system
  • Designed

    MessagePack encoding/decoding pipeline
  • Developed

    SSE streaming layer for real-time delivery
  • Implemented advanced features:

    • Delta updates (auto compare)

    • Version-based syncing

    • Channel subscription system (with wildcard support)

    • Heartbeat & connection management

  • Deployed and optimized system on

    Kubernetes with horizontal scaling

🔮 Future Scalability

  • Supports

    multi-source ingestion (multiple providers)
  • Can serve

    multiple client types

    (web, mobile, third-party APIs)

  • Designed as a

    reusable real-time infrastructure platform

🎯 Impact

  • Delivered

    low-latency real-time experience

    at scale

  • Reduced bandwidth via

    delta updates + MessagePack compression
  • Achieved

    high concurrency (~6,000+ users per pod)
  • Built a

    reusable real-time system for future products
Thairath Livescore Diagram

Thairathไทยรัฐเช็กผลบอลสด (Livescore)อัปเดตผลบอลวันนี้ผลบอลเมื่อคืน ทุกลีกดังพรีเมียร์ลีกยูฟ่าแชมเปียนส์ลีกฤดูกาล 2025-26รายงานผลสกอร์รวดเร็วแบบเรียลไทม์ที่นี่

Latest Projects

View all
Thairath Thailand Election 2026
Thairath

Thairath Thailand Election 2026

This platform delivers a data-driven experience for election coverage, transforming complex datasets into accessible and interactive visualizations.

JavaScriptNextJSReactJSExpressJSMongoDB
Dev PeriodDec 2025 – Feb 2026Live SinceFeb 2026
Thairath English
Thairath

Thairath English

Thairath English transforms Thai-language news into high-quality English content using an end-to-end AI translation pipeline.

JavaScriptNextJSReactJSExpressJSMongoDBOpenAI
Dev PeriodSep 2025 – Dec 2025Live SinceDec 2025
Thairath Fast
Thairath

Thairath Fast

Thairath Fast reimagines news consumption by combining AI-generated summaries with an interaction model inspired by platforms like short-form video apps.

JavaScriptTypeScriptReactJS
Dev PeriodSep 2025 – Nov 2025Live SinceNov 2025