Git Product home page Git Product logo

bcrypt-worker's People

Contributors

dm03514 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

domenzero

bcrypt-worker's Issues

JS Client Error Handling

This is not fully featured right now and needs to be resisted to better understand the hTTP client return values and how to best express those to the client.

Problem & Questions & Decision Log

Problem Statement

  • Document any piece of infrastructure needed
  • Ways of monitoring the service health
  • Client should handle failures
  • How would you deploy the worker and handle reloads and interruptions in the middle of a workload
  • Workload should spread evenly across workers
  • Benchmark with cost 10

Questions

How to drain?

  • In a deploy/drain scenario is there a timeout? do we bound to only allow a single deploy shuffle?
    • ie v1 is out
    • v2 deployed
    • v1 drain is sent, no new connections allowed
    • v2 accepting all new client connections
    • do we wait then shutdown ? v1? do we let v1 until all ? need some sort of timeout
    • do we allow for a deployment of v3 while v1 and v2 are still shuffling?
  • this is the only strategy I've used in production for deploys, deploy blue green, begin acceptin on new, drain old, shutdown old with timeout.
  • At some point we need the deploy to "end", and I kind of feel that it's up to the client to be defensive and retry within reason, this way the LB and deploy is reasonable in what it offers as minimal downtime, but the client can weather the event that it gets timed out and connection is terminated. How does this work for persistent connections?

Decision Log

  • Used prometheus because that was most familiar and I already had a local docker-compose infrastructure wired up from previous blog posts
  • Started with just the netgative crypt case to test the idea and deliver a fully integrated thin line through POC
  • Used json over http because it 's so easy in Go and accessible and widely known/understood, but would probably look at GRPC for an internal service because of the strict contracts, and the autogenerated clients
  • Skipped TLS because we could add it using a service proxy like envoy; even though data is unencrypted from envoy envoy is run as a sidecar on the local machine, so TLS would still be terminated on the worker machine, not sure if this flies or not
  • Load Shedding strategy? Worker has a worker pool also have hard timeouts on each HTTP request
  • Didn't touch on alerting: what are the service SLO's? how to we alert when we are in danger of breaching those? What interval are they ? how do we model budget as an alert?
  • Glossed over worker unit testing, focused on getting everything wired up and flushing out unknown uknowns
  • Worker ignored signal handling or actual process lifecycle in order to deliver POC
  • Skipped CI (like travis)
  • JS Client Error handling is not fully featured right now and needs to be resisted to better understand the hTTP client return values and how to best express those to the client.
  • Put the javascript client in the same repo for simplicity

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.