# fabrica-kit | Pantheon | Knowledge Base | Instagit

An essential engineered toolkit library for the go-pantheon ecosystem.

GitHub Stars: 2

Repository: https://github.com/go-pantheon/fabrica-kit

---

## Articles

### [How Does the Balancer Filter Work in Fabrica-Kit for Traffic Management](/go-pantheon/fabrica-kit/how-does-balancer-filter-work-in-fabrica-kit-for-traffic-management)

Discover how Fabrica-Kit's balancer filter optimizes traffic management with gRPC sticky routing, weighted round-robin, and master-type persistence for efficient session affinity.

- Tags: deep-dive
- Published: 2026-03-02

### [How to Set Up Multi-Format Logging (JSON vs Console) in Fabrica-Kit](/go-pantheon/fabrica-kit/how-to-set-up-multi-format-logging-json-vs-console-in-fabrica-kit)

Learn to set up multi-format logging JSON vs console in Fabrica-Kit using xlog.Init. Choose zap for JSON or other values for console logs.

- Tags: how-to-guide
- Published: 2026-03-02

### [Performance Considerations for High-Throughput Scenarios with fabrica-kit](/go-pantheon/fabrica-kit/performance-considerations-for-high-throughput-scenarios-with-fabrica-kit)

Boost fabrica-kit performance for high-throughput with read-only balancing, Redis pooling, MGET batching, and OpenTelemetry monitoring. Optimize your application today.

- Tags: performance
- Published: 2026-03-02

### [Read-Only Route Table Patterns and Use Cases in fabrica-kit](/go-pantheon/fabrica-kit/patterns-and-use-cases-for-readonly-route-table-in-fabrica-kit)

Discover readonly route table patterns and use cases in fabrica-kit. Learn how this secure, backend-agnostic foundation enables efficient service discovery with a layered architecture.

- Tags: deep-dive
- Published: 2026-03-02

### [How to Implement Custom Metrics Middleware in Fabrica-Kit: A Complete Guide](/go-pantheon/fabrica-kit/how-to-implement-custom-metrics-middleware-in-fabrica-kit)

Learn to implement custom metrics middleware in Fabrica-Kit using Kratos and OpenTelemetry. Enhance observability with request counters, latency histograms, and custom gauges.

- Tags: how-to-guide
- Published: 2026-03-02

### [How to Use Version Management in the Fabrica-Kit: Parsing and Validating Service Versions](/go-pantheon/fabrica-kit/how-to-use-version-management-in-fabrica-kit)

Learn how to manage service versions in Fabrica-Kit. Parse zone-prefixed strings like us-v1.20230428_153224 using the version package for reliable service identification.

- Tags: how-to-guide
- Published: 2026-03-02

### [Connection Picker in fabrica-kit: Bridging Kratos and gRPC Load Balancing](/go-pantheon/fabrica-kit/what-is-connection-picker-in-fabrica-kit-and-how-does-it-function)

Discover the fabrica-kit connection picker, a gRPC balancer integrating Kratos selector. Learn how it directs RPC calls to sub-connections for efficient load balancing.

- Tags: how-to-guide
- Published: 2026-03-02

### [How Route Table Renewal Enables Dynamic Updates in Fabrica-Kit](/go-pantheon/fabrica-kit/how-does-route-table-renewal-work-for-dynamic-updates-in-fabrica-kit)

Discover how fabrica-kit's route table renewal uses compare-and-expire for lock-free dynamic updates. Services renew entries intelligently, avoiding full table rewrites for efficient changes.

- Tags: deep-dive
- Published: 2026-03-02

### [How to Configure Trace Sampling Strategies in Fabrica-Kit: A Complete Guide](/go-pantheon/fabrica-kit/how-to-configure-trace-sampling-strategies-in-fabrica-kit)

Learn to configure trace sampling strategies in Fabrica-Kit. Customize OpenTelemetry samplers in trace.go or create a custom tracer provider for granular control over trace retention and performance. Get the complete guide now.

- Tags: how-to-guide
- Published: 2026-03-02

### [How to Handle Errors with xerrors in Microservices Using Fabrica-Kit](/go-pantheon/fabrica-kit/how-to-handle-errors-with-xerrors-in-microservices-using-fabrica-kit)

Master microservice error handling with go-pantheon/fabrica-kit and xerrors. Centralize errors, wrap with context, classify, and convert to Kratos API errors.

- Tags: how-to-guide
- Published: 2026-03-02

### [How to Integrate Fabrica-Kit with go-kratos Middleware: A Complete Guide](/go-pantheon/fabrica-kit/how-to-integrate-fabrica-kit-with-go-kratos-middleware)

Integrate Fabrica-Kit with go-kratos middleware for structured logging, metrics, tracing, and context enrichment. This guide makes adding Kratos middleware simple.

- Tags: how-to-guide
- Published: 2026-03-02

### [Load Balancing Strategies in Fabrica-Kit: Master and Reader Modes Explained](/go-pantheon/fabrica-kit/available-load-balancing-strategies-in-fabrica-kit)

Explore Fabrica-Kit load balancing strategies: Master for sticky writes and Reader for read-only traffic. Learn about weighted-round-robin with route-table stickiness.

- Tags: deep-dive
- Published: 2026-03-02

### [How Color-Based Routing Works in Fabrica-Kit: A Complete Technical Guide](/go-pantheon/fabrica-kit/how-does-color-based-routing-work-in-fabrica-kit)

Learn how color based routing in Fabrica-Kit achieves O(1) request to service mapping with deterministic colors derived from metadata. Optimize cache affinity efficiently.

- Tags: deep-dive
- Published: 2026-03-02

### [How to Use Context Extensions for OID and Color Propagation in Microservices](/go-pantheon/fabrica-kit/how-to-use-context-extensions-for-oid-and-color-propagation-in-microservices)

Leverage go-pantheon/fabrica-kit's context extensions to automatically propagate OID and color via gRPC/HTTP metadata for seamless microservice routing without boilerplate.

- Tags: how-to-guide
- Published: 2026-03-02

### [Understanding the Master Route Table and SetNxOrGet in Fabrica-Kit](/go-pantheon/fabrica-kit/what-is-master-route-table-and-how-does-setnxorget-work)

Learn about the master route table in go-pantheon/fabrica-kit. Discover how SetNxOrGet ensures atomic service registration, preventing race conditions for efficient routing.

- Tags: deep-dive
- Published: 2026-03-02

### [How to Use IP Utilities for Network Address Processing in go-pantheon/fabrica-kit](/go-pantheon/fabrica-kit/how-to-use-ip-utilities-for-network-address-processing-in-go-pantheon-fabrica-kit)

Learn to process network addresses using IP utilities in go-pantheon/fabrica-kit. Detect internal IPs, resolve endpoints, extract client IPs, and validate ranges with pure Go functions.

- Tags: how-to-guide
- Published: 2026-03-02

### [How Service Profiling Works in fabrica-kit Using the profile Package](/go-pantheon/fabrica-kit/how-does-service-profiling-work-in-fabrica-kit-using-profile-package)

Learn how service profiling works in fabrica kit with the profile package. Centralize runtime identity and access deployment metadata efficiently.

- Tags: how-to-guide
- Published: 2026-03-02

### [How to Set Up Structured Logging with xlog in Fabrica-Kit](/go-pantheon/fabrica-kit/how-to-set-up-structured-logging-with-xlog-in-fabrica-kit)

Learn to set up structured logging with xlog in fabrica-kit. Initialize your global JSON logger in main.go to automatically inject timestamps, service metadata, and trace IDs into every log entry.

- Tags: how-to-guide
- Published: 2026-03-02

### [How Connection Management Works in the fabrica-kit Router: A Deep Dive into gRPC Client Orchestration](/go-pantheon/fabrica-kit/how-does-connection-management-work-within-fabrica-kit-router)

Explore fabrica-kit router connection management. Discover how gRPC client orchestration utilizes service discovery, load balancing, and route-table coordination for deterministic routing.

- Tags: deep-dive
- Published: 2026-03-02

### [API Error Types in fabrica-kit: A Complete Guide to Structured Error Handling](/go-pantheon/fabrica-kit/available-api-error-types-in-fabrica-kit-and-how-to-use-them)

Understand fabrica-kit API error types for structured error handling in Go microservices. Learn to generate Kratos-compatible errors with HTTP status and reason codes for consistent responses.

- Tags: api-reference
- Published: 2026-03-02

### [How to Configure Distributed Tracing with OpenTelemetry in Fabrica-Kit](/go-pantheon/fabrica-kit/how-to-configure-distributed-tracing-with-opentelemetry-in-fabrica-kit)

Learn to configure distributed tracing with OpenTelemetry in Fabrica-Kit using trace.Init() for automatic log correlation with Redis and PostgreSQL. Simplify your observability.

- Tags: how-to-guide
- Published: 2026-03-02

### [How Route Tables Are Managed in Fabrica-Kit: Master and Read-Only Configurations Explained](/go-pantheon/fabrica-kit/how-are-route-tables-managed-in-fabrica-kit-master-readonly-configurations)

Learn how Fabrica-Kit manages route tables with master and read-only configurations. Explore its layered interface, deterministic keys, and pluggable storage for service registration.

- Tags: deep-dive
- Published: 2026-03-02

### [How the Go-Kratos Weighted Round-Robin Load Balancer Works in Fabrica-Kit](/go-pantheon/fabrica-kit/how-does-go-kratos-weighted-round-robin-load-balancer-work)

Discover how the go-kratos weighted round-robin load balancer in Fabrica-Kit combines NGINX WRR with sticky routing for consistent node selection. Optimize your distributed calls now.

- Tags: deep-dive
- Published: 2026-03-02

