class

KemalWAF::ConnectionPool

Inherits Reference / Object

Connection pool - her upstream URI + TLS context kombinasyonu için

Constants

Log = ::Log.for("connection_pool")

Constructors

new(upstream_uri : URI, tls_context : OpenSSL::SSL::Context::Client | Nil = nil, pool_size : Int32 = 100, max_size : Int32 = 200, idle_timeout : Time::Span = DEFAULT_IDLE_TIMEOUT_MINUTES.minutes, health_check : Bool = true)
Source

Instance methods

acquire(timeout : Time::Span = DEFAULT_POOL_ACQUIRE_TIMEOUT_MS.milliseconds) : HTTP::Client | Nil

Get connection from pool (with timeout)

Source
close_all

Close all connections

Source
create_new_connection

Create new connection (for fallback)

Source
release(client : HTTP::Client | Nil)

Connection'ı pool'a geri ver

Source
stats

Pool istatistikleri

Source