Optimizing badge performance
Before proposing possible solutions, here are a few questions I would ask if this were more than an exercise:
- The badge endpoint uses the pyramid app, the sql backend (authorization, block list), and the elastic backend (search). Which commponent(s) take up the most time or are most challenging to scale?
- For the purpose of the exercise, I'll assume the slowest/most expensive comopnent is elastic.
- What are the current and anticipated costs of the badge endpoint under the status quo? Would the cost of additional complexity (e.g. learning a new database, web framework, or programming paradigm) outweigh the savings from buying more servers?
- I'll assume that cloud infrastructure is cheap and developer time expensive, and lean toward keeping things simple rather than maximizing performance.
- What's the hypothesized value-add of the badge feature, and how can we test that hypothesis?
- Does the badge make users more likely to view or create annotations?
- Does A/B tes