Optimizing Gitea Act Runner Connection Load: Reducing from 1,300 req/s to 170 req/s

cover

Gitea Act Runner is the execution component of Gitea Actions, responsible for fetching CI/CD tasks from the Gitea Server and reporting execution results. As more teams self-host Gitea, the HTTP request volume between Runners and the Server has become a bottleneck on the Server side. This article documents how we analyzed and resolved this problem, reducing the request volume from approximately 1,300 req/s to approximately 170 req/s for 200 Runners — an 87% reduction.

Update (2026-04-20): This article originally described the design after PR #819 merged. A follow-up, PR #822, revealed during code review that #819 had introduced a concurrency regression for Runners with capacity > 1, and addressed it with a “single poller + semaphore” architecture. See the new section at the end: Follow-up: Single Poller with Semaphore (PR #822).

[Read More]

Gitea Act Runner 連線負載優化:從 1,300 req/s 降到 170 req/s 的實戰紀錄

cover

Gitea Act Runner 是 Gitea Actions 的執行元件,負責從 Gitea Server 領取 CI/CD 任務並回報執行結果。隨著越來越多團隊自架 Gitea,Runner 與 Server 之間的 HTTP 請求量成為了 Server 端的瓶頸。本文記錄我們如何分析並解決這個問題,將 200 個 Runner 的請求量從約 1,300 req/s 降到約 170 req/s,降幅 87%。

更新(2026-04-20):本文原本描述 PR #819 合併後的設計。後續 PR #822 在 code review 中揭露 #819 對 capacity > 1 的 Runner 引入了一個 concurrency regression,並用「單一 poller + semaphore」架構再次修正。請見文末〈後續修正:Single Poller with Semaphore(PR #822)〉章節。

[Read More]

The Next Step for AI Agents: API + CLI + Skills Architecture

cover

In previous posts, I introduced the concept of Agent Skills and showed how to build an AI-driven development workflow with Claude Code + GitHub Copilot Review. As more products and teams embrace AI Agents, a clear architectural pattern is emerging: API + CLI + Skills. This isn’t a framework or protocol — it’s a pragmatic three-layer architecture that enables any product to become “agent-friendly” quickly.

[Read More]

AI Agent 的下一步:API + CLI + Skills 架構

cover

在之前的文章中,我分別介紹了 Agent Skill 的概念以及如何用 Claude Code + GitHub Copilot Review 打造 AI 驅動的開發流程。隨著越來越多產品和團隊開始擁抱 AI Agent,一個清晰的架構模式正在浮現:API + CLI + Skills。這不是某個框架或協議,而是一種務實的三層架構,讓任何產品都能快速變得「對 Agent 友善」。

[Read More]

Building a Unified API Gateway for Cross-Cloud AI Services: A Secure and Scalable Enterprise Solution

blog logo

In today’s enterprise environment, Generative AI technology has become key to enhancing business efficiency and innovation. However, with the diversification and decentralization of AI services, how to uniformly manage and call these services has become a challenge. This article will introduce how to use Golang to develop a unified API Gateway for cross-cloud AI services, achieving a secure and scalable enterprise-level solution.

This was my second public talk at the 2025 iThome CloudSummit Taiwan. Below is the outline of the talk.

  1. Authentication and Authorization
  2. Multi-Cloud AI Backend Integration (Azure OpenAI, AWS Bedrock, Google Gemini AI, etc.)
  3. Traffic Control and Resource Management
  4. Monitoring and Metrics Aggregation
[Read More]

跨雲端 AI 服務統一 API Gateway:安全、可擴展的企業級解決方案

blog logo

在當今的企業環境中,Generative AI 技術已經成為提升業務效率和創新能力的關鍵。然而,隨著 AI 服務的多樣化和分散化,如何統一管理和調用這些服務成為了一個挑戰。本文將介紹如何使用 Golang 開發一個跨雲端 AI 服務的統一 API Gateway,實現安全、可擴展的企業級解決方案。

這是我在 2025 年 iThome 臺灣雲端大會 (CloudSummit) 的第二場公開演講,底下是演講的內容大綱。

  1. 身份驗證與授權
  2. 多雲人工智慧後端整合 ( Azure OpenAIAWS BedrockGoogle Gemini AI …. )
  3. 流量控制與資源管理
  4. 監控與指標聚合
[Read More]

Step-by-Step Guide to Building MCP Server and Client with Golang (Model Context Protocol)

blog logo

In 2025, I delivered a workshop at the iThome Taiwan Cloud Summit in Taipei, titled “Step-by-Step Guide to Building MCP Server and Client with Golang (Model Context Protocol)”. The goal of this workshop was to help developers understand how to implement the MCP protocol using Golang, providing practical code examples and hands-on guidance. I have organized all workshop materials into a GitHub repository, which you can find at go-training/mcp-workshop. For detailed workshop content, please refer to this link.

[Read More]

一步步學會用 Golang 開發 MCP 伺服器與客戶端 (Model Context Protocol)

blog logo

2025 年在台北 iThome 臺灣雲端大會 (CloudSummit) 給一場 Workshop,主題是「一步步學會用 Golang 開發 MCP 伺服器與客戶端 (Model Context Protocol)」。這次的工作坊旨在幫助開發者了解如何使用 Golang 實現 MCP 協議,並提供實際的程式碼範例和操作指南。我已經先將 Workshop 的內容整理成一個 GitHub Repo,您可以在 go-training/mcp-workshop 找到相關資源。詳細 Workshop 內容,請參考此連結

[Read More]

Learning Go Language with GitLab API

logo

Introduction

People often ask me how to learn Go language, and I usually suggest they start with a real project to quickly learn the language’s features. Personally, I started with small projects and gradually expanded their scope, from contributing to documentation to open-source projects, then learning how to modify the source code, and finally writing my own project. This learning method allows you to become familiar with the features of the Go language more quickly.

[Read More]

使用 GitLab API 學習 Go 語言

logo

前言

常有人問我如何學習 Go 語言,我通常建議他們從實際專案開始,這樣可以更快掌握語言特性。我個人也是先寫小專案,再逐步擴大範圍,從貢獻文件到開源專案,進而學習如何修改原始碼,最後再自己寫一個專案。這樣的學習方式能讓你更快熟悉 Go 語言的特性。

[Read More]