Smart cache invalidation using Varnish and Ray.AOP

Smart cache invalidation using Varnish and Ray.AOP

2018/04/29 BEAR.Sunday Meetup #6

68d247e854f0ca323a334f2fa18751b1?s=128

Yoshitaka Jingu

April 29, 2018
Tweet

Transcript

  1. Smart cache invalidation using Varnish and AOP VarnishͱAOPͰߏங͢Δ Ωϟογϡ࠷దԽΞʔΩςΫνϟ Yoshitaka

    Jingu @zingooo Bitnauts, inc.
  2. None
  3. None
  4. Infrastructure Reverse Proxy Layer Application Layer log, user tracking

  5. Cache ❖ TTL ❖ TOPϖʔδ͸30ඵ ❖ هࣄϖʔδ͸ 60ඵ ❖ ໌೔͸LINEͰ޿ࠂ͕഑৴͞ΕΔ͔Βର৅ͷϖʔδ͸3600ඵʹ͓ͯ͜͠͏ɾɾɾ

    ❖ ΩϟογϡແޮԽ ❖ ແظݶΩϟογϡ + ΩϟογϡແޮԽॲཧ
  6. None
  7. article.id = 1 article.id=1 article.id=8 article.id=2 article.id=5 recommend.id = 1

    article.id=3 article.id=4 article.id=6 recommend.id = 2 article.id=7 recommend.id = 3 article.id=8 ranking.id=1 ranking.id=2 ranking.id=3 ranking.id=4 ranking.id=5 ranking.id=6 ranking.id=7 ranking.id=8 ranking.id=9 ranking.id=10 ranking.id=11 ranking.id=12 feature.id=1 feature.id=2 feature.id=3
  8. vmod_xkey

  9. vmod_xkey

  10. bind

  11. page://self/ app://self/article

  12. XkeyInterceptor

  13. CombineHeaderInterceptor

  14. ط஌ͷ໰୊఺ ❖ ࣌ؒͰมԽ͢Δϖʔδ΁ͷରԠ ❖ ྫ͑͹ެ։ظ͕ܾؒ·͍ͬͯΔϖʔδͳͲ ❖ όονͰରॲ ❖ Link͞ΕͨϦιʔεͷxkey ❖

    Link͞ΕͨResourceObject͸bodyͷΈநग़͞Εɺϔομ͸ແࢹ͞ΕΔ ❖ ผ్Interceptorͷ։ൃ͕ඞཁ
  15. Thank you! REST AOP DI @koriym Contributors