Complete AI Training

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.

All 27 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

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 —

  1. Ask for missing inputs.
  2. Design the system architecture, highlighting key components and their roles.
  3. Propose specific optimization techniques tailored to the system type and data volume.
  4. Explain how each technique improves performance (e.g., latency reduction, throughput increase).
  5. 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 —

  1. How would you handle traffic spikes without degrading performance?
  2. What are the trade-offs between using horizontal scaling vs vertical scaling for this system?
  3. Can you provide a cost-benefit analysis of implementing distributed caching?