Better HN
topnewbestaskshowjobs
Log inSign up

lebinh

186 karma · joined Jun 28, 2010 (16y ago) · 21 submissions

I build new things and fix broken old things. https://github.com/lebinh

[ my public key: https://keybase.io/lebinh; my proof: https://keybase.io/lebinh/sigs/9B2jNoHnF4zRcb06uYKQe76vBRPTfiCzx4iM3rnVHCQ ]

Submissions

1.

The shortest ping-able IP(thisisbinh.me ↗)

2 points · by lebinh · 8y ago · discuss

comment 9y ago · link · parent

To me, that's mostly because the things we need to monitor are scattered around our planet.

comment 9y ago · link · parent

Just want to point out that Cloudflare doesn't charge for bandwidth, so egress from GCP to Cloudflare is a good way to cut the bandwidth cost.

comment 9y ago · link · parent

I wrote something out of our need for better monitoring/metrics for Nginx here: https://luameter.com/ And quite a few people are using it for per-vhost metrics use case just like you said. Also if you prefer something simpler and open source I also wrote this https://github.com/lebinh/ngxtop

5.

Show HN: Aq – Query AWS resources with SQL(github.com ↗)

9 points · by lebinh · 10y ago · 1 comment

comment 10y ago · link · parent

I showed ngxtop [0] about 2 years ago as a top inspired tool to quickly check the status of my nginx servers, something I created for my need. I expected some people would find it useful and shared, turned out a lot of people need something to monitor their nginx servers and it got 3k stars in a day or two. So I built a much better tool to help monitor nginx and sell it as a product, Luameter [1]. It didn't take off like the other but now making a couple hundreds a month and being used by some high-profile users, i.e. well-known companies.

[0] https://github.com/lebinh/ngxtop [1] https://luameter.com/

7.

Algorithms of the Mind(medium.com ↗)

47 points · by lebinh · 11y ago · 18 comments

comment 11y ago · link · parent

Cool idea! I've created a similar repo for Nginx from my experiences: https://github.com/lebinh/nginx-conf

comment 11y ago · link · parent

Measure and profile the code will always be the best thing to do but for simple 20% effort tips I think it would be:

* Don't write your own data structure, stick to the standard library or, in some rare cases, popular and well-known 3-rd party lib.

* Always prefer a Hash or a Set over anything else.

* Beware of any nested loops.

* Have some local / external caches and try memoization.

* Try parallelizing or better, non-blocking wait for all I/O operations.

comment 11y ago · link · parent

Hi, I'm the author of this.

About a year ago I open sourced a tool for quick monitoring and troubleshooting Nginx, ngxtop [1], and received some very positive interests from HN community. However quite a few people are using it as a monitoring solution for their Nginx server, which is not ideal. Ngxtop was designed to be like the `top` command, you fire it up to check for at most 5-10 minutes and stop. It was not meant to be a long monitoring process that can be used to plug to your monitoring system such as Zabbix or Nagios or graphed by Graphite. Nginx has an official status module for this [2], but it requires Nginx Plus, a > $1k product. Other solutions would normally require a log processing process piping to an external system to calculate and store the metrics. While an ELK stack [3] could provide you a lot more useful data, its setup and maintenance efforts can be significant. And that's why I created Luameter.

It easier to setup, flexible to configure, and equally easy to be plugged into external system given its JSON api.

[1]: https://github.com/lebinh/ngxtop [2]: http://nginx.com/products/live-activity-monitoring/ [3]: http://www.elasticsearch.org/overview/

11.

Show HN: Real-time Nginx monitoring with Lua and metrics(luameter.com ↗)

8 points · by lebinh · 11y ago · 1 comment

comment 12y ago · link · parent

Found this great library when trying to play with and visualise some data recently[1]. One of the easiest way to create a nice graph from pure python.

[1] https://github.com/lebinh/aws-usage-report-analyser

comment 12y ago · link · parent

Had awesome experience with Codementor (https://www.codementor.io/) recently, highly recommended for anyone looking for help or helping others.

comment 12y ago · link · parent

Unfortunately most of the servers I'm working with are still on python2 by default. The latest Ubuntu LTS, 12.04, only has python2 by default so python2 is still my priority. But in this case, a port should be trivia so I'll look into python3 as soon as possible.

Yes, ncurses would be much better but I haven't had time for it yet. Clearing screen is simple enough and work pretty well for me so far so here we are :)

comment 12y ago · link · parent

Thanks, I'll definitely add that, maybe put this on pypi asap. For now you can clone the repo and then run

pip install -r requirements.txt

to install required dependencies.

comment 12y ago · link · parent

If what you mean by exec time is request_time, i.e., serving time of a request, then it's pretty close on my agenda as long as you have it in your access log :)

comment 12y ago · link · parent

The performance impact really depend on your server and traffics. Currently with high traffic server it will take quite some amount of CPU if running for awhile, after 15-20 mins or so, but I'm working on reduce that. So now it mostly useful to know what's going on with your nginx at the moment but not over a long period.

comment 12y ago · link · parent

Thanks, I'll put it on pypi soon, just put it on github today

19.

Show HN: Real-time, top-like metrics for Nginx(github.com ↗)

134 points · by lebinh · 12y ago · 33 comments

comment 16y ago · link · parent

I used lyricswiki's api to get the url for the lyric's page, then parse it's html to get the lyrics. hope that helps ;)

comment 16y ago · link · parent

I created a similar app a couple of months ago :D http://nowlyrics.appspot.com It was also featured on last.fm, http://build.last.fm/item/481