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

Crónica de una escala anunciada

Crónica de una escala anunciada

Damian Schenkelman

June 23, 2016
Tweet

More Decks by Damian Schenkelman

Other Decks in Programming

Transcript

  1. Password Hashing app.post('/authenticate', (req, res) => { // fetch the

    user by req.username from db db.users.findOne({ email: req.body.email }, (err, user) => { ... // compare bcrypt for req.password to db hash const success = bcrypt.compare(req.body.password, user.passwordHash); res.send(success ? 200 : 401); }); });
  2. BaaS app.use('/login', (req, res) => { // fetch the user

    by req.username from db db.users.findOne({ email: req.body.email }, (err, user) => { ... // compare bcrypt for req.password to db hash baas.compare(req.body.password, user.passwordHash).then((e success) => { res.send(err || !success ? 401 : 200); }); }); });
  3. Cost comparison Price / (1M req) #req per sec /

    vCPU t2-micro $0.36 10.00 t2-medium $0.76 9.50 c4-large $1.53 10.00 c3-8xlarge $1.64 8.88
  4. Bye