Benchmark of Infisical KMS Port In Go

Infisical port to Go would reduce the baseline resources required for self deployed instances

I worked on redesigning the Infisicial KMS backend that acheives sub 5ms latency ,
The key points from benchmark

  • 3x faster than ts at p90 latency , p95,p99 are an order of magnitude faster , where ts showed 500ms response times
  • <30Mib memory footprint at 500req/s with 60s test time, sign/verify/crud most variance of operations covered in test
  • 92x less active memory footprint than TS , ts took >1500Mib to serve same volume at 500req/s
  • Architeture based on Microservices , Raft Consensus

Some of async features , auditlog , posthog event logging when included in Go , currently they are not , the relative memory increase would be in few Mib ,
Latency impact from async jobs goes neglible , and sub 7ms is sustainable guarentee by GO in the tested env

The process of rewriting took a month , and Handwritten for all backend codebase

There is a fully benchmark , Source Code , Write Up on the calculation and local setup guides
I can say by sure that all the infisical KMS endpoints in Go are logically consistent with TS backend , ready to serve as drop in replacement

I wish this finds useful in process of rewriting Infisical KMS services in Go

2 Likes

Full Read At : Siraj Uddin on X: "I spent a month of fully writing by Hand, an Key Management service Typescript port to Go &lt; 5ms sustatinable performance is plausible with Go where Ts was giving &gt;300ms at p95 latency with 3 replicated instances https://t.co/GqaY3vwDNw" / X
Full Benchmark report at:

2 Likes