The YDB Capacity Calculator is a single-page web application designed to help capacity planners determine server requirements for YDB clusters. The application implements two key use cases:
- Calculate Servers Needed: Determine how many servers are required based on specific capacity requirements
- Calculate Capacity Provided: Determine what capacity is provided by a given server configuration and server count
This tool implements all the business rules specified in the YDB capacity planning documentation.
- Dual Functionality: Toggle between calculating server requirements or provided capacity
- Comprehensive Input: Capture all relevant server configuration parameters
- Business Rule Compliance: Implements all YDB capacity planning business rules
- Real-time Calculation: Instant results based on user inputs
- Data Persistence: Server configuration automatically saved in local storage
- Responsive Design: Works on desktop and mobile devices
- Error Handling: Clear validation and error messages
- YDB Branding: Uses official YDB colors and styling
- Clone or download this repository
- Open
index.htmlin any modern web browser - Start calculating your YDB capacity requirements!
The application is deployed to Yandex Cloud S3 bucket with static website hosting:
./deploy.shFor detailed deployment instructions, see How to Deploy.
The project includes comprehensive documentation in the docs folder:
- User Guide - How to use the calculator
- User Stories - User requirements and scenarios
- Requirements - Project requirements
- Business Rules - Calculation logic and rules
- Technical Specification - Architecture and implementation
- Resources Provided Mode Technical Specification - Capacity calculation feature
- UI Design - User interface design
- Test Results - Testing documentation
- Smoke Tests - Browser-based smoke test suite
- Project Summary - Project overview
- How to Deploy - Deployment guide
- Deployment Plan - Deployment architecture and strategy
- GitIgnore Recommendations - Security guidelines
- Click the "Calculate Servers Needed" toggle
- Enter your server configuration parameters
- Enter your capacity requirements
- Click "Calculate Servers" to see the results
- Click the "Calculate Capacity Provided" toggle
- Enter your server configuration parameters
- Enter the number of servers in your configuration
- Click "Calculate Capacity" to see the results
- Storage groups consist of 9 VDisks each
- Reserve calculation (1% or minimum 18 VDisks)
- System resource reservations (CPU cores and RAM)
- Storage device resource reservations
- Minimum server count enforcement (12 servers)
- Frontend: HTML5, CSS3, Vanilla JavaScript
- Storage: Browser local storage for configuration persistence
- Architecture: Single-page application with dynamic UI updates
- Validation: Client-side input validation with user-friendly error messages
The application works in all modern browsers that support:
- HTML5
- CSS3
- JavaScript ES6+
- Local Storage
Browser-based Smoke Tests (Recommended)
- Open
test-runner.htmlin your web browser - Click "Run All Tests"
- View results in real-time
See Smoke Tests Documentation for detailed information.
Node.js Unit Tests
npm testydb-capacity-calculator/
├── index.html # Main application entry point
├── css/ # Stylesheets
│ ├── styles.css # Application styles
│ └── ydb-tech.css # YDB technical styles
├── js/ # JavaScript files
│ ├── calculator.js # Main calculator logic
│ └── core.js # Core calculation functions
├── images/ # Image assets
├── docs/ # Documentation
├── test/ # Node.js test files
├── test-runner.html # Browser-based smoke tests
├── deploy.sh # Deployment script
└── deply/ # Deployment configuration
└── settings.txt # S3 credentials (not in git)
- Make changes to the application files
- Test locally by opening
index.htmlin a browser - Run smoke tests: Open
test-runner.htmland click "Run All Tests" - Run unit tests:
npm test - Deploy:
./deploy.sh
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
For questions about using this calculator, please refer to the YDB documentation or contact YDB support.