Commit Graph
12 Commits
Author SHA1 Message Date
warkanum 3e327d0c78 fix(db): reduce per-request connection bursts and add dbtrace
* Throttle async session-activity writes to once per token per minute
* Add singleflight to session lookups, keystore validation and
  column/row security loads to stop cold-cache stampedes
* Preload security rules in BeforeHandle (restheadspec, resolvespec) so
  they no longer need a second connection while the read tx is open
* Add pkg/dbtrace: opt-in per-request DB call counting and pool logging
  (db_trace.* config, RESOLVESPEC_DB_TRACE_* env), wired into testserver
* Add tests for load dedup, activity throttle and dbtrace
2026-09-30 21:44:28 +02:00
Hein 467dbd66c8 feat(middleware): add per-client FIFO request queue with burst metrics
ClientQueue limits concurrent requests per client (X-Client-Id, then
Authorization, session, IP) and queues the rest first-in-first-out, with
bounded depth, max wait and idle eviction. Chain composes it with auth for
the Setup*Routes middleware slot. Exports burst, wait and depth metrics.
The test server uses it with a limit of 10.
2026-09-30 15:46:42 +02:00
Hein e1cf72834e fix(config): lock Manager, harden defaults handling and path/IP helpers
Guard viper with an RWMutex, make the singleton race-free and stop
NewManager replacing the global (add SetConfigManager), write saved
configs 0600, search CWD last, add ConfigFileUsed and Config.Validate,
nil-safe PathsConfig.Set, confine PathsConfig.Join, bound GetIPs DNS
lookup, and drop dead Unmarshal in SetConfig. Mark audit status.
2026-09-30 13:02:40 +02:00
warkanum 250fcf686c feat(config): add multiple server instances support
- Add ServersConfig and ServerInstanceConfig structs
- Support configuring multiple named server instances
- Add global timeout defaults with per-instance overrides
- Add TLS configuration options (SSL cert/key, self-signed, AutoTLS)
- Add validation for server configurations
- Add helper methods for applying defaults and getting default server
- Add conversion helper to avoid import cycles
2026-01-03 01:48:42 +02:00
Hein 6f05f15ff6 feat(dbmanager): ✨ Database connection Manager 2026-01-02 16:19:33 +02:00
Hein 897cb2ae0d fix: liniting issues and events dev 2025-12-30 14:40:45 +02:00
Hein 1baa0af0ac Config Package
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Waiting to run
Build , Vet Test, and Lint / Lint Code (push) Waiting to run
Build , Vet Test, and Lint / Build (push) Waiting to run
Tests / Unit Tests (push) Waiting to run
Tests / Integration Tests (push) Waiting to run
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Waiting to run
2025-12-09 09:19:56 +02:00
Hein 9c5c7689e9 More common handler interface 2025-12-02 15:45:24 +02:00
Hein ceaa251301 Updated logging, added getRowNumber and a few more 2025-11-10 17:02:37 +02:00
Hein 3eb17666bf Migration to Bitech 2025-11-10 11:43:15 +02:00
Hein 8e06736701 Massive refactor and introduction of restheadspec 2025-11-06 16:15:35 +02:00
warkanum f284e55a5c Initial Spec done. More work to do. Need to bring in Argitek designs 2025-01-08 23:45:53 +02:00