kratos

Your ultimate Go microservices framework for the cloud-native era.

23 articles 25.5k View on GitHub ↗
23 articles
Deploying Kratos Services in Production: Best Practices and Patterns

Learn best practices for deploying Kratos services in production. Utilize App lifecycle, service discovery, and OpenTelemetry for robust, observable applications.

best-practices
Mar 2, 2026
How to Configure Retry Logic and Timeouts for gRPC Client Calls in Kratos Services

Master gRPC client call retry logic and timeouts in Kratos services. Learn to use grpcWithTimeout, native retry policies, or custom interceptors for robust communication.

how-to-guide
Mar 2, 2026
Testing Strategies for Kratos Middleware Components and Applications

Master Kratos middleware testing. Explore unit tests, mock handlers, integration, and end-to-end strategies for robust applications. Ensure reliability with Kratos.

testing
Mar 2, 2026
How to Implement Custom Codec Serializers in Kratos for Non-Standard Formats

Implement custom Kratos codec serializers to support non-standard formats like applicationvndmyappprotobuf. Register your codec for automatic content negotiation.

how-to-guide
Mar 2, 2026
How to Integrate Kratos Services with Modern Service Mesh Platforms Like Istio and Linkerd

Integrate Kratos services with Istio and Linkerd. Learn how to enable distributed tracing, mTLS, and observability with your service mesh for enhanced control and insights.

how-to-guide
Mar 2, 2026
7 Common Pitfalls When Defining Protobuf Errors in Kratos

Avoid common protobuf error definition pitfalls in Kratos. Learn to correctly annotate enums, use valid HTTP codes, and ensure the protoc-gen-go-errors plugin runs for seamless error handling.

best-practices
Mar 2, 2026
How the Graceful Shutdown Mechanism Works in Kratos Application Lifecycle

Understand Kratos graceful shutdown. Learn how Kratos orchestrates signal handling pre-stop hooks deregistration context cancellation post-stop hooks and server stops.

internals
Mar 2, 2026
Performance Implications of Using a Kratos Middleware Chain: Optimization Guide

Explore Kratos middleware chain performance implications. Learn optimization techniques like zero-allocation patterns to minimize latency and boost your go-kratos application.

performance
Mar 2, 2026
What Are the Key Differences Between gRPC and HTTP Server Implementations in Kratos?

Explore Kratos gRPC vs HTTP server differences. Understand routing, middleware patterns, and protocol features for robust Go applications. Learn key implementation distinctions.

deep-dive
Mar 2, 2026
How Kratos Manages and Propagates Metadata Across Microservices: Context Flow Explained

Discover how Kratos manages and propagates metadata across microservices using context flow. Learn to bind request-level key-value pairs via HTTP/gRPC headers for efficient interservice communication.

internals
Mar 2, 2026
How to Integrate Third-Party Logging Libraries (Zap, Zerolog) with Kratos

Integrate third-party logging libraries like Zap or Zerolog with Kratos. Implement Kratos's logger interface using contrib adapters for seamless integration. Optimize your Kratos application logging.

how-to-guide
Mar 2, 2026
Default Content Encoding Formats in Kratos and How to Add Custom Codecs

Explore Kratos default content encoding formats JSON Proto YAML XML Form and learn how to add custom codecs by implementing the Codec interface in Go

how-to-guide
Mar 2, 2026

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →