Job Portal System Design
1. Business Requirements
Functional Requirements
- User registration and authentication (job seekers, employers, admins)
- Profile management for job seekers and employers
- Job posting, editing, and removal by employers
- Job search and filtering (by title, location, salary, skills, etc.)
- Application submission and tracking
- Resume upload and management
- Messaging between job seekers and employers
- Generate trends and analytics (e.g., most popular jobs, application rates)
- Notifications (application status, new jobs, interview invites)
- Mobile-ready responsive UI
Non-Functional Requirements
- 99.9% availability (max ~8.76 hours downtime/year)
- Scalability to support high traffic and spikes
- Secure data storage and access control
- Fast response times (<300ms for most requests)
- Audit logging and monitoring
- Backup and disaster recovery
- GDPR/data privacy compliance
Out of Scope
- Payroll or payment processing
- Third-party job board integration
- Video interview or conferencing features
2. Estimation & Back-of-the-Envelope Calculations
- Users: 100,000 job seekers, 5,000 employers
- Job posts: 50,000 active at any time
- Daily transactions: ~20,000 (searches, applications, messages)
- Peak concurrent users: ~2,000
- Data size:
- User profiles: 105,000 × 2 KB ≈ 210 MB
- Job posts: 50,000 × 2 KB ≈ 100 MB
- Applications: 2M × 0.5 KB ≈ 1 GB
- Messages: 5M × 0.5 KB ≈ 2.5 GB
- Resumes: 100,000 × 200 KB ≈ 20 GB
- Total DB size: ~25 GB (excluding logs, backups)
- Availability:
- 99.9% = 8.76 hours/year downtime max
- Use managed DB, multi-AZ deployment, health checks, auto-scaling
3. High Level Design (Mermaid Diagrams)
Component Diagram
mermaid
flowchart LR
User[User (Web/Mobile)]
LB[Load Balancer]
App[Application Server]
DB[(Database)]
Cache[Cache (Redis)]
Storage[Object Storage (Resumes)]
Analytics[Analytics Engine]
Notif[Notification Service]
User --> LB --> App
App --> DB
App --> Cache
App --> Storage
App --> Notif
App --> Analytics
Analytics --> DBData Flow Diagram
mermaid
sequenceDiagram
participant U as User
participant A as App Server
participant D as Database
participant C as Cache
participant S as Storage
participant N as Notification
U->>A: Apply for Job
A->>C: Check Job Post Cache
C-->>A: Hit/Miss
A->>D: Create Application Record
D-->>A: Success/Fail
A->>S: Upload Resume
S-->>A: Success/Fail
A->>N: Send Notification
A-->>U: ResponseKey Design Decisions
- Database: Relational DB (e.g., PostgreSQL) for transactional data, strong consistency
- Cache: Redis for fast lookups (job posts, sessions)
- Object Storage: For resumes and attachments (e.g., AWS S3, Azure Blob)
- Analytics: Batch or streaming (e.g., Kafka + Spark, or managed cloud analytics)
- Deployment: Cloud-based, multi-AZ, managed services for high availability
- Notifications: Email/SMS via third-party service (e.g., SendGrid, Twilio)
4. Conceptual Design
Entities
- User: id, name, email, role, profile, registration_date, status
- Employer: id, company_name, contact_info, profile
- JobPost: id, employer_id, title, description, location, salary, skills, status, posted_date
- Application: id, user_id, job_id, resume_url, cover_letter, status, applied_date
- Message: id, sender_id, receiver_id, content, sent_at
- Notification: id, user_id, type, message, sent_at
Key Flows
- Job Application:
- User applies for a job
- App checks cache for job post, falls back to DB
- Creates Application record, uploads resume to storage
- Sends notification to employer
- Job Posting:
- Employer posts a job
- App creates JobPost record, updates cache
- Notifies job seekers (if opted in)
- Analytics:
- Periodic jobs aggregate data for trends (e.g., most applied jobs, active employers)
Security
- Role-based access control (RBAC)
- Input validation, rate limiting
- Encrypted connections (HTTPS)
- Regular backups and audit logs
5. Bottlenecks and Refinement
Potential Bottlenecks
- Database contention (high read/write during peak):
- Use read replicas, caching, and DB connection pooling
- Resume storage:
- Use scalable object storage, CDN for downloads
- Analytics workload:
- Offload to separate analytics engine, run during off-peak
- Notification delays:
- Use async queues for notification delivery
- Single region failure:
- Deploy across multiple availability zones/regions
Refinement
- Monitor system metrics and auto-scale app servers
- Regularly test failover and backup restores
- Optimize queries and indexes for frequent operations
- Consider sharding if user/job volume grows significantly
This design provides a scalable, highly available, and mobile-ready job portal with analytics and robust operational practices.