9. GC issues
• Stateless API machines
• Tens of millions of requests per day
• Only a dozen or so servers
• 12 GB heap => 15sec GCs *ouch*
10. GC issues
• GC tuning?
• “There's no way to get around the fact that
we're allocating faster than we can collect.”
• Allocating ~200 MB/s
• Opportunity to reduce wasteful allocations
• Better load-balancing strategy
• Cap # of concurrent connections
11. GC issues
• Stateful WWW machines
• Stateful Lift + Scala closures + Java GC
• Lots of variables getting caught in Session
• val venues: RequestCache[List[Venue]] =
RequestCache(Venue.findAll(...))
12. MongoDB in Scala
• Some support built-in to Lift
• No expressive query language, so we wrote one:
Venue where (_.mayor eqs userid)
modify (_.tags push “I’m mayor!”)
updateMulti