View all success stories

Messaging, Streaming, and Persistence

About Personal.ai

Personal.ai is a revolutionary artificial intelligence platform that’s trained on the memories provided by conversations, social media interactions and other forms of communication. The system builds an AI model for each user, with the mission of empowering every individual to own their intelligence and be their own thought leader.

Overview

The AI is self-trained on data that an individual creates and captures as life happens. Personal.ai automatically categorizes all data and creates a structured view of an individual’s life that enables many use cases including time capsules, AI-powered mentorship, always-on AMA and interactive NFTs.

Personal.ai uses NATS to connect its various microservices, reduce latency for job completion and reduce infrastructure costs. The backend of the application runs in Kubernetes clusters in Amazon Web Services (AWS) with NATS providing connectivity for streaming, messaging and data persistence with NATS JetStream.

Challenges

Personal.ai needed a messaging and data streaming system that provided fast speeds with low resource requirements, a flexible persistence layer, and minimal management overhead.

Key Requirements:

  • Fast speeds with low resource requirements
  • A flexible persistence layer
  • A broad array of client languages
  • Rapid scalability
  • Low management overhead
  • Flexibility to follow streaming or messaging conventions
  • Always-on reliability

Technical Challenges:

The unique application architecture, strict performance requirements and large number of components presented many DevOps challenges. Personal.ai needed to manage thousands of parallel streams simultaneously, each going to their own unique data model.

The company initially built using Amazon Lambda serverless functions with Simple Queuing Service (SQS) and Simple Messaging Service (SMS), deploying a Redis key-value store for persistence. However, bugs in health checks resulted in massive AWS bills, and bottlenecks appeared in data pipelines with imprecise management of expensive GPU instances.

Personal.ai ruled out Kafka due to heavy infrastructure requirements, scaling challenges and high management overhead. Other messaging systems like RabbitMQ and MQTT were also ruled out due to inability to easily run active-active configurations at scale or handle streaming data, plus considerable overhead and resource requirements.

Why NATS

Personal.ai chose NATS with NATS JetStream after evaluating all major messaging and streaming technologies. NATS checked all the boxes for their requirements.

Technology Benefits:

  • Low latency, high performance
  • Short learning curve
  • Small footprint and resource requirements
  • 45+ clients and pre-baked connectors
  • Combines data streaming with persistence layer and KV store
  • Can scale horizontally or vertically in seconds
  • Works equally well as a data plane and as a management plane
  • Extensible to SaaS++ model with Leaf Nodes

Business Benefits:

  • Low cost with high performance
  • Open source and hosted by CNCF
  • Simple and robust data security
  • Reliable – never goes down and doesn’t lose data
  • Minimal management overhead – less than one FTE
  • Covers use cases of multiple other solutions (messaging, streaming, caching, KV store)

Results

Personal.ai successfully deployed NATS as their core messaging and streaming infrastructure, achieving significant improvements in reliability, cost, and operational efficiency.

  • Cost Efficiency: NATS installed on small public cloud instances proved extremely cost effective compared to Kafka and RabbitMQ, handling high volumes of streams and messages without performance lags despite smaller compute capacity.
  • Simplified Architecture: With JetStream, Personal.ai eliminated a separate key-value store and simplified their overall architecture.
  • Reliable Infrastructure: NATS proved highly reliable and available with zero downtime, becoming a critical dependency Personal.ai could always count on.
  • Developer Productivity: The YAML manifests are clear and easy to use, making startup quick and painless. The wide number of clients enabled connection, observation and monitoring of all internal services.
  • Lightweight Deployment: NATS can run on laptops and small instances while maintaining high performance - something impossible with other messaging technologies.
  • Quick Implementation: Personal.ai got their first NATS test environment up in minutes, with helpful support from the community and Synadia team.
It just doesn't go down. We can always count on NATS.
Sharon Zhang
CTO at Personal.ai

Read More Success Stories

Cancel