Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Design a mobile app logging platform that scale...

Avatar for Shuzhi Shuzhi
March 01, 2022

Design a mobile app logging platform that scales for hundreds of engineers

Logging for a giant app is challenging. Besides the general challenges such as mobile network reliability, data quality or performance concern. For a giant app you have to control the log growth sustainably, ensure data interoperability across logs from teams who probably even don't know each other, avoid the tragedy of the commons, reduce cognitive load for logging, control data quality without slowing people down...

The talk shares some experience we learnt in designing a sustainable logging platform that is effective and scales. It will cover the principles, origins, evolvement, and some good practices. The talk will steer away from specific technical terms or implementation details, but the abstract design concepts should be transferrable and IMO way more important. I think it's a fun story of a platform team (well described concept from Team Topologies) in action.

Through the journey, we learn some of the values that an architect can bring (quotes from Software Architect Elevator):
- Prevent people from exercising intelligence unnecessarily.
- Act like a gardener, create context where ideas can evolve and thrive in harmony.

Avatar for Shuzhi

Shuzhi

March 01, 2022

Other Decks in Technology

Transcript

  1. Software engineering manager in Google. Mostly working on logging, experimentation

    and performance on mobile apps. Passion to empower product velocity, allow teams in big companies to move faster and more effectively. Personal Bio
  2. Disclaimer: not an implementation playbook. High level lessons and principles

    in designing a logging platform that scales for a mobile app, taking into consideration of techniques, teams, products and culture. Preview
  3. • How many times a feature is triggered? • How

    reliable is your connection to the server? • How long does a task take? • How many clicks to an icon? • … There are more things you need to know
  4. Extended business service • Buffer into your existing http requests

    (e.g. CGI param) to the server. • Send a dedicated http call to existing business server. Feature Foo: { Duration:1600ms, Status: SUCCEED, Connection: WiFi … }
  5. Single responsibility: a dedicated logging service • Batches and upload

    when not in user critical path. • Optimize for mobile performance consideration (e.g. wifi mode, sampling).
  6. Where are we? Default Stage 2 Stage 1 1 S

    1 Extension 2 4 3 Events Stage 3
  7. Problems → Solutions Timer Reliability Tracker Counter Error System Health

    … Usages Batching Aggregation Sampling Transport
  8. Problems → Problems E r r o r Timer Relia-

    bility Counter Dream Reality
  9. Where are we? Default Stage 2 Stage 1 1 S

    1 Extension 2 4 Fragmentation 3 Events Stage 3
  10. Team Topologies definition of Platform Team A grouping of other

    team types that provide a compelling internal product to accelerate delivery by Stream-aligned teams
  11. So what does the team do? Empower the teams to

    do logging Maintain a healthy logging platform
  12. #1 Empower the teams Logging team(s) - polish each of

    the layer’s solution: • UI layer, tie to the view • Business layer, declarative on tasks • System layer, automatic and performance sensitive (aggregation, sampling, buffering)
  13. #1 Empower the teams Developers: think about what layer of

    answers you are looking for, then seek for logging tools in that layer.
  14. #1 Empower the teams Using your services won’t make your

    clients less independent. Shareable SUPER Principle Understand and solve client problems, empower them. Useful Simplicity and ease of use, self-serviced, automation over toil. Easy Respect the users, cost efficient. Performant Being unreliable is worse than don’t exist. Reliable
  15. #2 Maintain a healthy platform Data as a product: shared

    syntax, declarative, surfaced and accountable
  16. #2 Maintain a healthy platform Uphold data quality: metrics, surfacing,

    alerting, auto-action on staleness, volume and reliability
  17. #2 Maintain a healthy platform Shared binary Product A Configuration

    Product A dashboards, docs, tools Distributed model: different products decoupled but sharing the same code
  18. How was the result? • From a stream-aligned team perspective:

    three-layer well-lit path, low cognitive load. No one stands in my way, no approval needed (in well-lit path). Maintain or retire my own logs. • From holistic product team or analysts team perspective: due to the shared syntax and semantics (layer), they can understand the full picture, even across teams. • From logging platform perspective: provide a 3-layer service, don’t do the operation for others, and the platform is healthy.
  19. 1. Start from default 2. An extension on existing business

    service 3. An event-based dedicated service 4. Various organic ‘solutions’ addressing symptoms 5. Systematic platform design for the overall landscape Recap
  20. 1. Start from default 2. Organic: An extension on existing

    business service 3. Architect: An event-based dedicated service 4. Organic: Various organic ‘solutions’ addressing symptoms 5. Architect: Systematic platform design for the overall landscape Architect Recap