go-zero is a full-stack Go microservices framework with an integrated code generation toolchain (goctl). In production, it provides a production-grade HTTP/REST server (rest/) with a middleware chain for authentication, tracing, rate limiting, circuit breaking, and load shedding; a gRPC server/client framework (zrpc/) with interceptors for observability, auth, and timeout; an API gateway (gateway/) that translates HTTP requests to gRPC; and a CLI tool (goctl) that generates Go, TypeScript, Dart, Java, and Swagger code from API definitions, SQL schemas, and protobuf files. The core library (core/) delivers building blocks: configuration loading (YAML/JSON/TOML), structured logging with rotation, Prometheus metrics, OpenTelemetry tracing, circuit breaker (Google SRE algorithm), adaptive load shedding, rate limiting (token bucket, period limit), distributed caching (Redis, in-memory), SQL/NoSQL data access with caching, service discovery (etcd, Kubernetes), concurrency primitives (singleflight, mapreduce, stream processing), and data structures (rolling window, timing wheel, safe map). The architecture is modular, with each package providing clean interfaces and option patterns. The codebase is well-tested, actively maintained, and demonstrates strong engineering craftsmanship.
Kratos is a production-grade Go microservices framework designed for cloud-native applications. It provides a unified transport layer supporting both HTTP (gorilla/mux) and gRPC, with a composable middleware chain for cross-cutting concerns like logging, tracing, authentication, rate limiting, and circuit breaking. The framework is protobuf-first: service definitions are written in proto files, and code generators (protoc-gen-go-http, protoc-gen-go-errors) produce HTTP stubs and structured error types. It includes a pluggable configuration system with support for multiple sources (file, etcd, consul, nacos, apollo, kubernetes, polaris), a service registry abstraction with implementations for etcd, consul, nacos, eureka, zookeeper, kubernetes, polaris, and others, and a load balancing selector with algorithms like random, weighted round-robin, and power of two choices (p2c). Observability is integrated via OpenTelemetry (tracing, metrics, logging) and Sentry error tracking. The CLI tool `kratos` scaffolds new projects, manages proto generation, and handles upgrades. The architecture is modular: core packages are minimal and extensible, with contrib packages as separate Go modules. The codebase demonstrates strong engineering practices, clean interfaces, and well-tested core components.
Apache ServiceComb Java Chassis is a production-grade microservices SDK for Java, providing a comprehensive framework for building, registering, discovering, and governing distributed services. It supports multiple programming models (Spring MVC, JAX-RS, POJO) and transport protocols (REST over Vert.x/Servlet, custom binary Highway, WebSocket). The architecture is modular: a core engine (SCBEngine, Invocation) orchestrates filter chains for consumer, provider, and edge roles; pluggable service registries (ServiceCenter, Consul, ZooKeeper, Nacos, etcd, lightweight) handle discovery and registration; governance modules (circuit breaker, retry, rate limiting, bulkhead, fault injection) are policy-driven via Resilience4j; and Swagger/OpenAPI generators automatically produce API contracts from Java annotations. Dynamic configuration is supported through multiple sources (config-center, Kie, Apollo, etcd) with priority-based injection and hot-reloading. External dependencies include Spring Boot, Vert.x, Jackson, Guava, Resilience4j, Zipkin, and Micrometer. In production, a typical data flow begins with a consumer invocation (via RestTemplate, Invoker.createProxy, or RpcReference) that passes through a consumer filter chain (load balancing, retry, circuit breaker), then a transport layer (REST or Highway) to the provider, which processes the request through a provider filter chain (rate limiting, validation, business logic) and returns a response. The framework handles service registration at startup, periodic heartbeats, and instance cache updates via discovery events. Edge/gateway services can apply custom authentication and routing filters. The codebase is large (3355 files) but well-organized into modules: core, transports, providers, governance, swagger, service-registry, clients, foundations, and demos. It demonstrates strong engineering practices: extensive use of SPI for extensibility, filter chain pattern for middleware, event bus for decoupled lifecycle events, and priority-based configuration management. However, the sheer number of demo modules and multiple registry implementations introduces maintenance overhead, and some legacy patterns (LegacyPropertyFactory, JMockit in tests) indicate areas of technical drift.