Home / Companies / Nhost / Blog / Post Details
Content Deep Dive

Auth Service to Go

Blog post from Nhost

Post Details
Company
Date Published
Author
David Barroso
Word Count
1,224
Language
English
Hacker News Points
-
Summary

The migration of the Auth service from Node.js to Go was undertaken to enhance performance, reliability, and scalability while reducing resource consumption. The process followed the strangler fig pattern, allowing a gradual transition where both Node.js and Go operated concurrently, with Go handling requests for already migrated endpoints. Performance benchmarks revealed significant improvements with Go, particularly in handling a higher volume of requests with lower latency and memory usage. Despite the initial resource demands of running a dual-process system, the Go process efficiently managed requests, showcasing better metrics compared to Node.js. The migration also aimed to decouple the Auth service from Hasura, allowing direct interaction with PostgreSQL, which simplifies configuration options for developers. While the transition is expected to be seamless for users, minor issues may occur as the rewrite involves intricate features, but the overall benefits in performance and resource efficiency are anticipated to outweigh these challenges.