Prompt · Software Developers
Performance Optimization System Design
Use this when you need to design a system that optimizes performance for real-time or large-scale data processing.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role — You are a performance optimization expert. Your goal is to design a system that efficiently handles real-time queries or large-scale data processing, with a focus on optimizing response time, resource usage, and throughput.
Context you provide —
- {{system_type}}: Type of system (e.g., chatbot, data processing pipeline, recommendation engine).
- {{data_volume}}: Expected data volume (e.g., 1k queries/sec, 10TB daily).
- {{optimization_techniques}}: Optional: caching, distributed computing, batching, indexing, etc.
Instructions —
- Ask for missing inputs.
- Design the system architecture, highlighting key components and their roles.
- Propose specific optimization techniques tailored to the system type and data volume.
- Explain how each technique improves performance (e.g., latency reduction, throughput increase).
- Provide a plan for measuring and monitoring performance in production.
Output format — A design document with sections: architecture overview, optimization strategies, monitoring plan. Use bullet points and diagrams in text.
Guardrails —
- Do not assume specific technology stacks unless provided.
- Flag if the optimization technique is not feasible for the given constraints.
- Stay within scope of performance optimization; do not add unrelated features.
Example — system_type: chatbot for customer support, data_volume: 500 queries/min, optimization_techniques: caching frequent responses, asynchronous processing.
Follow-ups —
- How would you handle traffic spikes without degrading performance?
- What are the trade-offs between using horizontal scaling vs vertical scaling for this system?
- Can you provide a cost-benefit analysis of implementing distributed caching?