Do you still remember that random graph interface that you guys ruined? It was updated today! In the past few years, Random Graph API has been a “little toy” and “common tool” for many front-end developers, 2D webmasters, and even desktop plug-in enthusiasts.
🥇 Generation 1: Simple but clunky starting point
To be honest, the random graph API at that time was just a small PHP script + a cloud host. The goal at that time was simple: provide an interface that can return random pictures.
Features are as follows:
- All requests are concentrated on one server;
- Image storage and API services are coupled together;
- No caching, no intelligent distribution, completely dependent on single point performance;
- CPU surges during peak periods, 502 errors are reported, access is slow, and traffic takes up storage;
[Client] ---> [Center Server (Only)] ---> [Image File]
🥈 The second generation: the transitional era of cloudization and caching
After entering the second generation, the random graph API has entered the “cloudification” stage. Arrangements have been made to move services to the cloud, introduce caching, CDN, and load distribution.
Main changes:
- Pictures are uniformly hosted on third-party picture platforms (such as Sina Picture Library);
- The interface runs on a cloud host or lightweight application server;
- Added basic caching logic (such as Redis or Nginx caching layer);
- The service is overall more stable and access speed is significantly improved.
[Client]
↓
[Cloud server interface layer] --> [CDN cache] --> [Image bed (Sina)]
- Access still needs to be transferred through the central server. When encountering high concurrency or uneven regional network distribution, the delay will still be obvious.
- All requests still have to go through the “central server”,
- Once the server has a seizure, everyone will be buried together 💀.
🚀 The third generation random graph API is here!
✨ Core Highlights
The third generation random graph API is an architectural rebirth.
Relying on the powerful capabilities of Tencent Cloud EdgeOne with more than 3200+ edge nodes, requests can be automatically scheduled globally to the node closest to the user for execution, achieving a true decentralized distributed architecture.
⚡️ Core changes:
- 🌐 Relying on EdgeOne edge node network;
- 🧠 Intelligent scheduling, nearby response;
- 🧱 Trigger edge functions to directly execute logic on nodes;
- 📉 Access latency is significantly reduced, and stability and availability are greatly improved.
┌────────┐
[Client] ──▶ │ Nearest edge node │
└───┬─────┘
↓
[Edge function processing request]
↓
[Response to random image link]
🗂 System update
- ✅ Added 28,000 pictures, with richer content;
- ✅ Completely reconstruct the system architecture;
- ✅ Remove the access restrictions of the old version;
- ⚠️ The pictures are still hosted on Sina Pictures (due to historical and well-known reasons), and are temporarily accessed through transfer.
📡 Access experience address:
👉 https://random.moejue.cn
Note: Due to well-known reasons, the global acceleration zone (excluding mainland China)