Top Banner
how to become a match maker for your backend
31

How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

Feb 09, 2017

Download

Technology

Tech in Asia ID
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

how to become a match maker

for your backend

Page 2: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

About• geekdad()

• current("VP Engineering SETIPE”)

• before(['Erafone', 'Wayang Force', ‘Qeon’])

elsewhere ->

@dedenf github.com/dedenf

Page 3: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

try our app

ANDROIDsoon!

Page 4: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

SETIPE

Page 5: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

• A Match Maker

• currently 450k registered users

• Mashed up between (psychology + technology) = #love

• 31 married couple who met at SETIPE

• yang jadian?

Page 6: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

+Technology

=Awesomeness

Page 7: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

our humble stack

Page 8: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)
Page 9: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

Let’s break it down inside out

Page 10: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

Load balancer

Page 11: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

Nginx to the rescue

Page 12: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

act as load balancer, http proxy

there are other solution, like HAProxy, node-http-proxy …

Page 13: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

NodeJS Kue

AppStack

ExpressJS ejs

AgendaMongoJS

Page 14: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

Monolithic AppVS

Microservices Architecture

Page 15: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

Monolithic App

single codebase call every library on the run

single bug could ruin all your system hard to scale

one request could involved all the system

Easy to managebut

Page 16: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

Microservices Architectureseparate codebase

if there’s a bug in a service only that service affected minimal resource

support for event driven arch

Hard to manage

but sometimes…

Page 17: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

Distributed system is hot right now

Page 18: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

pub-sub

Page 19: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

we use it a lotqueue

messaging session store

introducing redis

and we make cluster of it

Page 20: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

Matchmaking Engine

we use redis to holds our job queue to matchmaking people

and worker will took care of it

Page 21: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

consistency

Page 22: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

Eventual consistency is a consistency model used in distributed computing to achieve high

availability that informally guarantees that, if no new updates are made to a given data item, eventually all accesses to that item will return the last updated

value.

https://en.wikipedia.org/wiki/Eventual_consistency

Page 23: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

99% Consistency is good enough

Page 24: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

know your tools- load balancing (haproxy, nginx, …) - webserver (nginx, …) - always use compression - Static assets (CDN)

Page 25: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

Monitoring

Page 26: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

you can’t optimize what you don’t

measure

Page 27: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)
Page 28: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)
Page 29: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

things to watch‣is the app running? ‣is the app overloaded? ‣how many errors do we have ‣how your cluster are doing ‣app performance ‣database(s) (this is down to your app perf)

Page 31: How To Become a Match Maker For Your Backend by Deden Fathurahman (Setipe)

Thank you