6,537 karma · joined Mar 10, 2011 (15y ago) · 4,332 submissions
HN'er since 2011 when PG responded and was active.
Other companies: NodeSocket, Commando.io, Elastic Byte.
Living in Nashville, Tennessee. Charlie Munger "there are three ways to go broke... liquor, ladies and leverage."
- GitHub: https://github.com/nodesocket
- justin [at] HN-USERNAME {dot} comcomment 10y ago · link · parent
See the following short clip from the film: https://youtu.be/90CkXVF-Q8M?t=36m2s
comment 10y ago · link · parent
I have to guess the investors (Founders Fund - Thiel) know something I don't, because seems like a lost battle from my porch.
comment 10y ago · link · parent
# add a backend
curl http://127.0.0.1/upstream_conf?add=&upstream=backend&server=10.0.0.1:8000
# remove a backend
curl http://127.0.0.1/upstream_conf?remove=&upstream=backend&id=1
[1] - https://www.nginx.com/blog/dynamic-reconfiguration-with-ngin...comment 10y ago · link · parent
Sorry for the long code block below, but it is a full working example that has automatic health checks (adds and removes backends automatically) and a dynamic backend configuration that is persisted to a state file.
http {
proxy_next_upstream error timeout http_502 http_504;
match statusok {
status 200;
body ~ "200 OK";
}
upstream backend {
state /etc/nginx/backend-state/backends;
zone backend 256k;
keepalive 20;
}
}
server {
# dynamic upstream
location = /upstream_conf {
upstream_conf;
allow 127.0.0.1;
deny all;
}
location / {
proxy_connect_timeout 15s;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://backend;
}
# health check
location /internal-health-check {
internal;
proxy_connect_timeout 15s;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://backend;
health_check interval=3s fails=3 passes=5 uri=/health match=statusok;
}
}
[1] - https://nginx.org/en/docs/http/ngx_http_upstream_conf_module...[2] - http://nginx.org/en/docs/http/ngx_http_upstream_module.html#... [3] - http://nginx.org/en/docs/http/ngx_http_upstream_module.html#...
comment 10y ago · link · parent
The single biggest problem by far was ripping/replacing 3rd party SaaS services that we use/pay for with native code. While building a SaaS it is wonderful to use 3rd parties to save time and complexity. Examples include Stripe (payments), Rollbar (error tracking), Intercom (support/engagement), Iron.io (queue and async tasks), Gauthify (two factor auth)... Howerver, when you go to on-prem often times the servers don't have a public interface, so your entire application has to work offline.
2nd tip. While it may seem like a good idea to create a separate branch in your repo for on-prem (i.e. enterprise branch), this is bad idea. It ends up being much better to just if/else in the master branch all over the place:
if(enterprise) {
// do something
}
If/else in the master branch is what GitHub Enterprise does as well (at least was told so).comment 10y ago · link · parent
Well, XDomainRequest is extremely limited. You can only send text/plain content-types (no JSON). You can't specify custom request headers and the source page and server must be using the same scheme. Basically, XHR CORS on IE 8 and 9 are essentially not possible.
comment 10y ago · link · parent
Tim, this is why leadership of companies at the top by "committee" doesn't work. You need a strong leader (type A) that is a dictator to silence the masses and guide the company forward. Otherwise, you get a million different voices speaking up thinking they are somehow instantly experts in a field.
comment 10y ago · link · parent
I'll be the first to admit, the innovation in terms of using the latest and greatest hardware and software technologies has not been there for Apple. However, this has been the case for a long time since Apple does something genius. They let other companies test new markets, built first to market products, watch them struggle, refine, and evaluate the market. Then, when the timing is just perfect, and a frenzy has been created they release a new product. Their products are like the Mercedes-Benz of cars. Sure, they aren't as fast and high performance as Ferrari or Lamborghini, but they are quality built, reliable, familiar to owners, and pleasant to drive.