SendGrid Night 7 メルカリUS-UKでの事例とバウンスメール処理/Mercari US-UK and Bounced mail processing

700669515ee872152d8b9403c2a0cf8c?s=47 kazeburo
March 29, 2017

SendGrid Night 7 メルカリUS-UKでの事例とバウンスメール処理/Mercari US-UK and Bounced mail processing

700669515ee872152d8b9403c2a0cf8c?s=128

kazeburo

March 29, 2017
Tweet

Transcript

  1. ϝϧΧϦUS/UKͰͷࣄྫͱ ό΢ϯεϝʔϧॲཧͷ঺հ Masahiro Nagano @kazeburo
 SendGrid Night #7 Mercari US/UK

    and Bounced mail processing
  2. Me • Masahiro Nagano • @kazeburo • Mercari, Inc
 Principal

    Engineer
 Site Reliability Engineering (SRE) Team • BASE, Inc Technical Advisor
  3. Agenda • About Mercari • Mercari Global Infrastructure • Introducing

    of our bounce-mail processing
  4. Mercari 1. The largest Mobile Marketplace app in Japan 2.

    Instant listing 3. Safe and secure payment
  5. Global Service JP US UK 2017/03/15 Launch 2016/08 3rd place

    in AppStore
  6. Global Infrastructure Ishikari DC Dedicated Server Cloud Cloud JP US

    UK
  7. Email Infrastructure Ishikari DC Dedicated Server Cloud Cloud JP US

    UK on Mechanical Turk emand Workforce Human Intelligence Tasks (HIT) Assignment/ Task Requester Workers azon nical Turk Service Specific Amazon Mechanical Turk On-Demand Workforce Human Intelligence Tasks (HIT) Assignment/ Task Workers Amazon Mechanical Turk Non-Service Specific ssignment/ Task Requester Workers otherMTA
  8. Email Architecture ©2011 Amazon Web Services LLC or its affiliates.

    All rights reserved. sers Client Multimedia Corporate data center Traditional server Mobile Client nagement nsole IAM Add-on Example: IAM Add-on an Intelligence asks (HIT) Assignment/ Task Requester Workers App App Queue = Q4M BUY Worker Worker Postfix Using Postfix for 1. Queuing messages 2. Faster than PHP 3. Connection aggregation
 (But Postfix can’t reuse ssl connection ) PHP PHP PHP PHP SMTP SMTP+TLS
  9. Email content(US) • Transaction Emails • Buy, Sell, Register •

    New arrival items (Daily) => • with automated schedule • Promotion Emails • From Self-made CRM / AB tests Total: Tens of millions to over 100 million / month
  10. Bounce mail processing

  11. A while ago We were using SES.

  12. SES bounce processing App Worker Postfix Amazon SES BOUNCE Amazon

    SNS MySQL WebHook email: failed User Users Client Multimedia Corporate data center Tra s Mobile Client Amazon Mechanical Turk On-Demand Workforce Human Intelligence Tasks (HIT) Assignment/ Task Requester Workers Amazon Mechanical Turk Non-Service Specific NOTIFY Oh!
  13. We currently use SendGrid

  14. SendGrid has Event WebHook

  15. Make SendGrid
 Event Receiver App Worker Postfix Event WebHook User

    Users Client Multimedia d Mobile Client Amazon Mechanical Turk On-Demand Workforce Human Intelligence Tasks (HIT) Assignment/ Task Requester Workers Amazon Mechanical Turk Non-Service Specific NOTIFY Oh! All Action Event Receiver fluentd Amazon S3 WebHook Mackerel When BOUNCE
  16. SendGrid Event Receiver • 120 lines Perl App server +

    fluentd • Receive all SendGrid Event and log them • Log SES/SNS compatible JSON when event_type is `bounced` or `dropped` • fluentd send it to API server asynchronously • Did not need modify API code • Other logs are used for monitoring and analysis
  17. Monitoring with Mackerel Something Happened? Visualizing + Alerting

  18. Conclusion • Mercari US/UK is using SendGrid • Thank you

    for Great Service. Delivering Emails has been made simple and reliable. • We realize bounce-mail processing by EventHook
  19. end