Sneak Peek into Togai’s Architecture
Togai is a pricing infrastructure platform designed for SaaS companies to observe, measure, analyze, and price their products more scientifically. The text discusses the challenges of building a usage-based billing software at scale and how Togai's tech stack was chosen mindfully to ensure scalability and quick iteration implementation. The backend architecture is based on microservices, with Kotlin as the primary language due to its type checking capabilities and compatibility with Java's ecosystem. Key libraries used include Ktor for HTTP web framework, jOOQ for generating Java code from databases, FlywayDB for managing database migrations, HikariCP for optimizing connections between DB and application servers, and more. NodeJS was chosen for the ingestion component due to its async IO capabilities, with OpenAPI used to manage interoperability issues. Vue3 is the primary language for the frontend, while Postgres and TimescaleDB are used for database management. NATS is employed as a message queue solution, with AWS SQS serving as a backup in case of failure. Togai is deployed and hosted on the AWS cloud, using Terraform and Chef for infrastructure configuration management. Docker-compose is utilized for setting up local development environments, while testing relies on Postman's automation tool (Newman) to test backend APIs. Vector is used for log collection, with Newrelic employed as an observability solution for monitoring app servers, infrastructure, and front-end synthetics.
Company
Togai
Date published
March 28, 2024
Author(s)
Hari Narayanan
Word count
1653
Language
English
Hacker News points
None found.