-
Notifications
You must be signed in to change notification settings - Fork 1
AWS Infrastructure
Garot Conklin edited this page Dec 17, 2024
·
2 revisions
RunOn! uses a serverless architecture on AWS, integrated with MongoDB Atlas and various Google APIs.
-
Event Discovery Function
Function: event-discovery Runtime: Python 3.11 Memory: 256MB Timeout: 30s Environment: - GOOGLE_API_KEY - MONGODB_URI - REDIS_URL
-
User Management Function
Function: user-management Runtime: Python 3.11 Memory: 128MB Timeout: 10s Environment: - AUTH0_DOMAIN - MONGODB_URI
API: runon-api
Stage: v1
Endpoints:
- /events:
GET: event-discovery-function
POST: event-save-function
- /preferences:
GET: user-preferences-function
PUT: user-preferences-update-function
Security:
- Auth0 Authorizer
- API Key validation
- Rate limiting-
Monitoring:
- Lambda function metrics
- API Gateway metrics
- Custom metrics for event discovery
-
Alarms:
- Error rate thresholds
- Latency thresholds
- Integration failures
-
Clusters:
- Production: M10 cluster
- Development: M0 shared cluster
-
Configuration:
Version: 6.0 Backup: Daily Retention: 7 days Scaling: AutoScaling: enabled Min Instances: 1 Max Instances: 3
-
Configuration:
Engine: Redis 7.0 Instance: cache.t4g.micro Nodes: 1 Auto Failover: disabled Backup: disabled TTL Settings: - Event Cache: 15 minutes - User Preferences: 1 hour - Static Data: 24 hours
Domain: runon.auth0.com
Applications:
- Mobile App:
Type: Native
Allowed Callbacks: com.runon://callback
- Backend:
Type: Machine to Machine
Permissions:
- read:events
- write:events
- manage:preferences- EventDiscoveryRole:
Permissions:
- lambda:InvokeFunction
- dynamodb:Query
- dynamodb:PutItem
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
- UserManagementRole:
Permissions:
- lambda:InvokeFunction
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItemProvider: GitHub Actions
Stages:
- Build:
- Install dependencies
- Run tests
- Package Lambda functions
- Deploy:
- Update Lambda functions
- Update API Gateway
- Update CloudWatch alarms
- Post-Deploy:
- Run integration tests
- Verify endpoints
- Check monitoringTemplate: AWS SAM
Resources:
- Lambda Functions
- API Gateway
- IAM Roles
- CloudWatch Alarms
Version Control:
Repository: fleXRPL/RunOn
Branch: main- Lambda provisioned concurrency for high-traffic functions
- Redis caching to reduce API calls
- MongoDB Atlas tier optimization
- CloudWatch Logs retention policy
- CloudWatch Logs
- X-Ray tracing
- Custom metrics
- Error tracking
- Performance monitoring
- MongoDB Atlas continuous backup
- Multi-region API Gateway
- Lambda function versioning
- Regular disaster recovery testing
graph TB
Client[Mobile App] --> API[API Gateway]
API --> Auth[Auth0 Authorizer]
API --> Lambda[Lambda Functions]
Lambda --> MongoDB[MongoDB Atlas]
Lambda --> Redis[Redis Cache]
Lambda --> Google[Google APIs]
subgraph AWS
API
Auth
Lambda
end
subgraph External Services
MongoDB
Redis
Google
end
classDef aws fill:#FF9900,stroke:#232F3E,stroke-width:2px,color:black;
classDef external fill:#85B09A,stroke:#232F3E,stroke-width:2px,color:black;
class API,Auth,Lambda aws;
class MongoDB,Redis,Google external;
sequenceDiagram
participant App as Mobile App
participant Gateway as API Gateway
participant Auth as Auth0
participant Lambda as Lambda Function
participant Google as Google APIs
participant Cache as Redis Cache
participant DB as MongoDB Atlas
App->>Gateway: Request Events
Gateway->>Auth: Validate Token
Auth-->>Gateway: Token Valid
Gateway->>Lambda: Process Request
alt Cache Hit
Lambda->>Cache: Check Cache
Cache-->>Lambda: Return Cached Data
else Cache Miss
Lambda->>Google: Search Events
Google-->>Lambda: Event Data
Lambda->>DB: Store Events
Lambda->>Cache: Update Cache
end
Lambda-->>Gateway: Return Response
Gateway-->>App: Events Data
graph LR
Code[Code Repository] --> Actions[GitHub Actions]
Actions --> Build[Build Stage]
Build --> Test[Test Stage]
Test --> Deploy[Deploy Stage]
Deploy --> Lambda[Lambda Functions]
Deploy --> Gateway[API Gateway]
Deploy --> Monitoring[CloudWatch]
classDef pipeline fill:#2088FF,stroke:#232F3E,stroke-width:2px,color:white;
classDef aws fill:#FF9900,stroke:#232F3E,stroke-width:2px,color:black;
class Code,Actions,Build,Test,Deploy pipeline;
class Lambda,Gateway,Monitoring aws;
© RunOn! 2024
Full-Featured Documentation
- Android Technical Stack (Archived)
- Android Architecture (Archived)
- Business Prospectus (Archived)
- Feature Specifications (Archived)
- UI/UX Design (Archived)