๐๏ธ AvilaDB
The Distributed Fortress. The Data Engine.
AVILA (fortress) + DB (database) = AvilaDB
Where data finds solid ground and engines drive queries
๐ง๐ท Latency 5-10ms in Brazil | ๐ Multi-region writes FREE | ๐ฆ 4 MB documents (2x competitors)
๐ฏ What is AvilaDB?
AvilaDB is the distributed NoSQL database for the AVL Cloud Platform - built as a fortress for your data and an engine for your queries.
Like Arxis provides the mathematical citadel, AvilaDB provides the data citadel:
- ๐๏ธ Solid Foundation: Consistent, durable, ACID-compliant storage
- โ๏ธ Query Engine: High-performance queries with vector search
- ๐ก๏ธ Protection: Encryption, backups, multi-region replication
- ๐ Performance: 5-10ms latency in Brazil, sub-50ms in LATAM
๐ Key Features
๐ง๐ท Optimized for Brazil & LATAM
- 5-10ms latency in Sรฃo Paulo, Rio, Brasรญlia
- Sub-50ms throughout Latin America
- 40-60% cheaper than AWS DynamoDB or Azure Cosmos DB
- Native Portuguese documentation and support
๐ฆ Large Documents
- 4 MB per document (vs 400 KB DynamoDB, 2 MB Cosmos DB)
- 50 GB per partition (vs 10 GB DynamoDB, 20 GB Cosmos DB)
- Hierarchical Partition Keys (HPK) overcome limits
๐ Native Vector Search
- Built-in HNSW index for embeddings
- Semantic search without external services
- Perfect for AI/Chat/RAG applications
- Low-cost compared to Pinecone/Weaviate
๐ Multi-region Writes (FREE)
- Global distribution included
- No extra cost (unlike AWS/Azure)
- Automatic conflict resolution
- Active-active replication
โก High Performance
- Compression: LZ4 via
avila-compress(>500 MB/s) - Throughput Units (TUs): Elastic scaling
- Connection pooling: Reuse clients
- Batch operations: Bulk writes/reads
๐ฐ Pricing (Brazil)
- R$ 0,50 per 1M operations
- R$ 0,20 per GB/month storage
- FREE multi-region writes
- FREE vector search (built-in)
๐๏ธ Architecture
AvilaDB follows the Arxis philosophy - solid as a fortress, powerful as an engine.
Built on top of world-class libraries from the Arxis ecosystem:
Core Dependencies
-
๐๏ธ avila-compress
- Native LZ4/Zstd compression (100% Rust, zero external deps)
- 3x faster than standard implementations (>500 MB/s)
- Optimized for columnar data and time-series
- Production-ready โ
-
๐ avila-telemetry
- Time series analysis, anomaly detection, forecasting
- NASA-grade data quality metrics (โฅ0.95 threshold)
- Observability and performance monitoring
- 22 tests passing โ
-
๐งฎ avila-math
- Mathematical kernel for vectors and tensors
- Shared across entire AVL ecosystem
- High-performance linear algebra
- 26 tests passing โ
-
๐ก avx-http
- Native HTTP client/server for AVL Platform
- Optimized for Brazil and LATAM latency
- Built on Tokio + Axum
Architecture Layers
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AvilaDB - Data Citadel โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ๐๏ธ Storage Layer (RocksDB) โ
โ - ACID transactions โ
โ - LSM-tree storage โ
โ - avila-compress (LZ4/Zstd) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ๏ธ Query Engine โ
โ - SQL-like queries โ
โ - Vector search (HNSW + avila-math) โ
โ - Partition-aware routing โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ๐ก๏ธ Distribution Layer โ
โ - Raft consensus โ
โ - Multi-region replication โ
โ - Automatic failover โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ๐ API Layer (avx-http + Axum) โ
โ - REST + gRPC โ
โ - WebSocket subscriptions โ
โ - avila-telemetry observability โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฆ Installation
Add to your Cargo.toml:
[]
= "0.1"
= { = "1", = ["full"] }
Using the CLI
# Install via curl
|
# Connect to AvilaDB
# Query data
Local Emulator (Docker)
๐ Quick Start
Basic Operations
use ;
async
Vector Search (AI/RAG)
use ;
async
Hierarchical Partition Keys (HPK)
use ;
async
๐ Use Cases
๐ฎ Game Development
- Player profiles and session data
- Leaderboards and rankings
- In-game chat and social features
- Real-time matchmaking queues
- 5-10ms latency for Brazilian players
๐ค AI/Chat/RAG Applications
- Chat history with vector embeddings
- User context and memory
- Semantic search for retrieval
- Multi-user isolation
- Native vector search (no extra services)
๐ E-commerce
- Product catalogs
- Shopping carts
- Order management
- User profiles and wishlists
- Real-time inventory
๐ก IoT & Scientific
- Sensor data ingestion
- Device twins and profiles
- Time-series storage
- Telemetry aggregation
- LIGO/LISA data storage
๐ Comparison with Competitors
| Feature | AvilaDB | AWS DynamoDB | Azure Cosmos DB |
|---|---|---|---|
| Max document size | 4 MB โ | 400 KB | 2 MB |
| Partition size | 50 GB โ | 10 GB | 20 GB |
| Multi-region writes | FREE โ | Extra cost | Extra cost |
| Vector search | Native โ | Requires OpenSearch | Limited |
| Brazil latency | 5-10ms โ | 80-120ms | 40-60ms |
| Pricing (1M ops) | R$ 0,50 โ | USD 1.25 | USD 0.85 |
| Storage (GB/month) | R$ 0,20 โ | USD 0.25 | USD 0.25 |
AvilaDB is 40-60% cheaper for Brazilian workloads! ๐ง๐ท
๐ ๏ธ Best Practices
Data Modeling
// โ
GOOD: Embed related data
let user = new
.set
.set
.set;
// โ BAD: Too many separate documents for always-together data
// users -> profiles -> preferences (3 queries instead of 1)
Partition Key Choice
// โ
GOOD: High cardinality, even distribution
.partition_key // userId, tenantId, deviceId, sessionId
// โ BAD: Low cardinality, hot partitions
.partition_key // "active", "inactive" (only 2 values!)
Diagnostics
// Log diagnostic info when latency is high
let result = players.query
.execute
.await?;
if result.latency_ms > 100
๐งช Development Tools
CLI
# Connect to account
# List databases
# Query interactively
# Create collection
# Import data
# Export data
Emulator
# Run locally (no cloud costs!)
# Update connection string
๐ Documentation
- Official Docs - Complete guide
- API Reference - Rust API docs
- Best Practices - Optimization tips
- Examples - Code samples
๐๏ธ Philosophy - The Data Citadel
AvilaDB embodies the Arxis philosophy:
๐๏ธ ARX - Fortress
- Solid storage: ACID transactions, durability guarantees
- Protection: Encryption at rest and in transit
- Reliability: Multi-region replication, automatic backups
โ๏ธ AXIS - Engine
- Query power: Fast SQL-like queries, vector search
- Scalability: Elastic throughput units, auto-scaling
- Performance: Optimized for Brazil and LATAM
๐ง๐ท Built for Brazil
- Local presence: Data centers in Sรฃo Paulo, Rio
- Low latency: 5-10ms for Brazilian users
- Fair pricing: R$ instead of USD, 40-60% cheaper
- Portuguese-first: Docs, support, community
๐ค Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/awesome-feature) - Commit your changes (
git commit -m 'Add awesome feature') - Push to the branch (
git push origin feature/awesome-feature) - Open a Pull Request
๐ Support
Email: nicolas@avila.inc WhatsApp: +55 17 99781-1471 GitHub: https://github.com/avilaops/arxis Docs: https://docs.avila.cloud/aviladb
๐ License
Dual-licensed under MIT OR Apache-2.0 - See LICENSE-MIT and LICENSE-APACHE for details.
๐๏ธ Built by Avila
AvilaDB - The Distributed Fortress Part of the AVL Cloud Platform
๐๏ธ Solid as a fortress โ๏ธ Fast as an engine ๐ง๐ท Built for Brazil
Built with โค๏ธ in Rust for the Brazilian and LATAM tech community.