bcrypt-worker's People
Forkers
domenzerobcrypt-worker's Issues
Add README with descriptions and screenshots to talk about the project
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.
Service Skeleton
Basic Executable Service Skeleton with metrics.
0 Downtime Deploys
Worker Successful Case Workflow & Tests
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
deployedv1
drain is sent, no new connections allowedv2
accepting all new client connections- do we wait then shutdown ?
v1
? do we letv1
until all ? need some sort of timeout - do we allow for a deployment of
v3
whilev1
andv2
are still shuffling?
- ie
- 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
js service client
Service Checks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.