Lei Xia

Sr. Software Engineer | Solution Architect

Writing code, Enjoying life, Building future

RSS · Sponsor

avatar

Learn Terraform and AWS at Zero Cost with LocalStack: A Complete Practical Guide

November 5, 2025 · 1739 words · 9 min

When learning AWS and Terraform, the biggest pain points are often the high costs of cloud services and the financial risks of misconfigurations. This guide will show you how to use LocalStack to simulate AWS services locally, enabling you to learn and experiment with Terraform Infrastructure as Code (IaC) at zero cost and zero risk.

In this tutorial, we’ll build a complete AWS network architecture including VPC, public/private subnets, Internet Gateway, security groups, and EC2 instances. All resources run in your local LocalStack environment without incurring any AWS charges or security risks from configuration errors.

C++ Coroutines Advanced: Converting std::future to asio::awaitable

July 15, 2025 · 696 words · 4 min

In modern C++ development, coroutines have brought revolutionary changes to asynchronous programming. However, when using boost::asio or standalone asio, we often encounter scenarios where we need to convert traditional std::future<T> to asio::awaitable<T>. This article will detail an efficient, thread-safe conversion method.

Lunet: Design and Implementation of a High-Performance Coroutine Network Library

July 12, 2025 · 1511 words · 8 min

Lunet is a high-performance runtime written in C that integrates LuaJIT and libuv, focusing on coroutine-driven asynchronous programming. It simplifies the handling of asynchronous I/O and blocking tasks, enabling developers to easily write high-concurrency network applications using Lua scripts. It’s ideal for scenarios like game servers and network services.

IRSA vs. EC2 IAM:Usage Scenarios and Permission Management Practices

March 25, 2025 · 724 words · 4 min

In AWS environments, assigning permissions to workloads is critical for security and functionality. For applications running on EC2 or EKS, two common approaches are EC2 IAM Instance Roles and IRSA (IAM Roles for Service Accounts). This article explains what they are, their differences, usage scenarios with code examples, and common issues with solutions, helping the team choose the right authentication method and avoid permission confusion.

Principles Of Microservice Architecture

February 13, 2025 · 3289 words · 16 min

The microservices architecture is a method of building complex applications as a collection of small services, where each service runs in its own independent process and is typically built around specific business capabilities. These services communicate through well-defined APIs, often HTTP RESTful APIs or lightweight messaging systems. When designing a microservices architecture, it is crucial to follow a series of core principles to ensure the maintainability, scalability, and flexibility of the system.

The Evolution Of Service Architecture

February 12, 2025 · 1820 words · 9 min

In the long history of software engineering, service architecture has evolved from monolithic applications to Service-Oriented Architecture (SOA), and then to microservices architecture.

OpenTelemetry Getting Started Guide

December 2, 2024 · 636 words · 3 min

Three Pillars of Observability In modern distributed systems, observability is crucial for ensuring system health and performance.

Build a weather query agent

August 22, 2024 · 1078 words · 6 min

In the field of artificial intelligence, intelligent agents (Agent) are one of the cutting-edge applications of Large Language Models (LLM).

Understanding the "Temperature" of Large Language Models

August 20, 2024 · 539 words · 3 min

In the realm of artificial intelligence, large language models (LLMs) have become sophisticated tools for generating human-like text. A pivotal concept in steering these models is the “temperature,” which dictates the randomness and creativity of the generated text. This blog post aims to demystify the temperature setting in LLMs and provide a professional overview.

Build Your AI Search Bot with LLM and Search Engines

August 15, 2024 · 938 words · 5 min

In the tide of artificial intelligence, the combination of large language models (LLMs) and search engines has brought revolutionary changes to the field of information retrieval. This article will provide a detailed introduction on how to use these technologies to build an intelligent information retrieval assistant—an AI search bot. We will delve into various aspects such as project background, core principles, code implementation, usage examples, and open-source addresses.