Commit Graph

28 Commits

Author SHA1 Message Date
lukaszraczylo 1b7890f322 Gofmt the codebase. 2025-02-26 00:47:41 +00:00
lukaszraczylo 66c8fef24d Improve the test coverage 2025-02-26 00:44:14 +00:00
lukaszraczylo d83c3a4567 Increase tests coverage. 2025-02-25 23:55:25 +00:00
lukaszraczylo 2ab78d35ce Configuration Management:
Optimized the getDetailsFromEnv function to reduce redundant lookups and improve type handling
Added direct environment variable access for better performance

Memory Cache Optimization:

Implemented a size-based compression threshold (1KB) to avoid compressing small payloads
Added cache size limits (10,000 entries) to prevent memory leaks
Implemented efficient eviction strategies for the oldest entries
Added atomic counter for thread-safe cache size tracking
Improved cleanup routines with GC triggering for large caches

Proxy Implementation:

Refactored the proxy code into smaller, focused functions for better maintainability
Optimized gzip handling for better performance
Improved error handling and logging
Enhanced tracing integration

GraphQL Processing:

Optimized introspection query checking with fast-path returns
Improved object pool usage
Added detailed comments for better code understanding
Split complex functions into smaller, more focused ones
Fixed test compatibility issues with introspection checking

Request Processing:

Refactored the request processing logic into smaller, focused functions
Separated user extraction, caching, and request handling for better maintainability
Improved error handling and response generation

Tracing Enhancements:

Added better span context management
Implemented custom attributes for more detailed tracing
Added sampling configuration to reduce overhead
Improved resource attribution with host and process information
Added timeout handling for tracing operations

Application Lifecycle:

Implemented graceful shutdown with proper signal handling
Added goroutine management with wait groups
Improved startup sequence with better error handling
Added timeout handling for shutdown operations
2025-02-25 23:34:39 +00:00
lukaszraczylo 839e211790 fixup! New release. 2024-08-19 15:52:40 +01:00
lukaszraczylo ae9a44033b New release.
Includes the panic when cache is completely disabled.
2024-08-19 15:43:42 +01:00
lukaszraczylo dc9e0906fd Resolve issue when proxy could panic.
Issue occured when cache was disabled via environment variables but
graphql queries contained the cache directive.
2024-08-19 11:27:06 +01:00
lukaszraczylo a24e6c8c4d fixup! Fix the introduced bug where RO endpoint could've been accidentally used. (#17) 2024-06-29 08:52:41 +01:00
lukaszraczylo d141fe3c04 Fix the introduced bug where RO endpoint could've been accidentally used. (#17)
* Fix the introduced bug where RO endpoint could've been accidentally used.
2024-06-28 21:48:39 +01:00
lukaszraczylo eb9821dc3f Fix redis cache benchmark. 2024-06-28 13:37:31 +01:00
lukaszraczylo b10a28bf52 General code optimisations. (#16)
* General code optimisations.
2024-06-28 12:31:01 +01:00
lukaszraczylo f8a7b8ad83 fixup! Update go.mod and go.sum 2024-06-28 00:40:58 +01:00
lukaszraczylo f7babe93d9 fixup! Disable caller as it's not necessary and generates slight delay. 2024-06-20 08:41:33 +01:00
lukaszraczylo 61d7a45d00 Update cache library, use miniredis for testing, add additional benchmarks. (#14)
Update cache library,
Update logging library,
use miniredis for testing, add additional benchmarks.
2024-06-19 23:10:36 +01:00
lukaszraczylo de31912d2f increase error handling and mutex encapsulation (#12)
* increase error handling and mutex encapsulation

* undo method rename for now

* set cant return error

---------

Co-authored-by: Chris Clayton <chris.clayton@contino.io>
2024-06-15 10:21:49 +01:00
lukaszraczylo e5b3eff1cd Adjust field alignment. 2024-06-12 12:07:22 +01:00
lukaszraczylo d05172294c fixup! fixup! Fix: Redis connection for tests. 2024-06-11 11:49:50 +01:00
lukaszraczylo fe7af0b8ca Fix: Redis connection for tests. 2024-06-11 11:43:07 +01:00
lukaszraczylo 12e0294945 Add distibuted cache with Redis 2024-06-11 11:35:50 +01:00
lukaszraczylo a9fd6b3d0a Release: Add cache operations via API + support distributed redis cache. 2024-06-11 11:35:46 +01:00
lukaszraczylo 5a01ec3876 Improve logging and cache sub-packages to decrease the number of allocations
and improve performance.
2024-05-14 09:21:16 +01:00
lukaszraczylo b19b17b7c4 Realign the structs to decrease memory footprint.
Add the timeout settings to address the connection drops.
2023-12-14 17:16:38 +00:00
lukaszraczylo bc305dd8e9 Improve tests and speed things up a little. 2023-11-20 11:38:02 +00:00
lukaszraczylo 4255f87efd Add cache compression. 2023-10-20 11:21:01 +01:00
lukaszraczylo 6ac3937066 Fix leaky bytes allocation for cache. 2023-10-13 16:29:52 +01:00
lukaszraczylo 089d05b7c3 Improve cache mechanism using sync map 2023-10-13 15:37:57 +01:00
lukaszraczylo 7293583a99 Resources allocation improvement. 2023-10-13 15:26:24 +01:00
lukaszraczylo dbd005bdcf Remove external library dependency, use homebrewed cache instead. 2023-10-13 15:22:47 +01:00