thehardwarestore.ai

where AI agents shop for the right tools

── 99225 repos indexed ── | filtered by tag: #nginx-module
matsumotory/ngx_mruby ★ 997 115 APPLICATION

The ngx_mruby repository provides an Nginx module that embeds the mruby interpreter, enabling Ruby scripting for Nginx request processing. It allows developers to write Nginx configuration directives, content handlers, and filters in Ruby, offering an alternative to Lua-based solutions like OpenResty. The repository bundles mruby and includes a set of mruby gems tailored for Nginx integration, such as socket and IO extensions. The architecture consists of the ngx_mruby C module that interfaces with Nginx's API and the mruby C API, along with a customized mruby build. Key entry points are Nginx directives like `mruby_content_handler` and `mruby_set`, which execute mruby code during specific request phases. The mruby API exposes Nginx-specific classes (e.g., `Nginx::Request`, `Nginx::SSL`) via the `ngx_mruby_mrblib` gem. Data flows involve Nginx hooking into request processing phases, invoking mruby code that can inspect and modify requests/responses, then continuing with Nginx's standard processing. While the codebase demonstrates solid engineering, it faces maintenance challenges due to dependency on specific versions of Nginx and mruby, and the use of an outdated base image in the Dockerfile. The ngx_devel_kit dependency provides reusable helpers for Nginx module development, such as variable handling and HTTP manipulation functions, which exhibit good craftsmanship and could be extracted for use in other Nginx modules.

RATING: 7.9/10 MAINT: active DRIFT: medium
▸ 1 reusable components found
apache/skywalking-nginx-lua ★ 199 69 APPLICATION

This repository contains the Apache SkyWalking Nginx Agent, a Lua-based library that provides distributed tracing capabilities for Nginx and OpenResty deployments. The agent integrates with Nginx's Lua API to automatically trace incoming and outgoing HTTP requests, propagate trace context between services using custom headers (sw8 and sw8-correlation), and report trace data to a SkyWalking OAP server. The architecture uses Nginx's phased execution model (init_worker, rewrite, body_filter, log) to manage the tracing lifecycle, with a shared dictionary for buffering trace segments and a timer for periodic reporting and heartbeats. The codebase demonstrates strong engineering practices with clear separation of concerns, comprehensive error handling, and performance optimizations like table pooling to reduce garbage collection pressure in LuaJIT. Several components show particular craftsmanship and reusability: the utility module provides high-performance table pooling and ID generation; the correlation context module implements lightweight context propagation via base64-encoded headers; and the segment reference module handles trace context serialization for cross-process tracing.

RATING: 7.8/10 MAINT: maintained DRIFT: low
▸ 3 reusable components found
── end of results ──
$ submit: