HNHacker News
TopNewBestAskShowJobs

reza_n

310 karma · joined March 24, 2015

Reza Naghibi https://reza.naghibi.com

I write fast code, fast.

submissionscomments
reza_n··on Thread Pools in Nginx Boost Performance 9x (2015)
Completely depends on if these are actual "worker threads" or just dumb threads which have been over scheduled.

If these are "worker threads", new workers are scheduled when all other workers are blocked and work is available. This guarantees that idle CPU will always be scheduled with work. When workers unblock, they continue execution on their work and start picking up new work. The worker scheduler will stop scheduling new workers and the extra workers will go back to the pool of inactive workers. This is the idea behind a worker or thread pool, they get scheduled when its possible to do more work.

A poor implementation of this idea will just hand work off to threads and then expect them to all execute in parallel, which will lead to negative performance impact.

The problem with (some implementations of) async workers is that just scheduling more will result in the latter problem, work split across too many workers. This is especially true for workers implemented as entire processes. The problem this post brings up is that 1 to 1 mapping of workers to cores suffers from idle CPU due to unanticipated blocking. The general solution is to smartly distribute work over a pool of workers, and not blindly schedule a fixed number workers.

reza_n··on Lenovo ThinkPad X1 Carbon review
I bought the 2nd gen ThinkPad X1 Carbon (20A7) back in 2014. Been rock solid to this day and not a single complaint. This is my main dev machine. Ive been running Ubuntu since I got it, so the 8GB of RAM has been more than enough. No driver issues or anything, high density screen has been great, CPU is fast (Intel Core i7 dual core), and battery life is still excellent. Even have the finger print reader working :)
reza_n··on Airbnb dominated by professional landlords
It converts long term housing stock into short term housing, which benefits tourists with cheaper prices and increases the price for residents since both are competing for the same units. Basically, tourists are getting a free ride on the backs of residents. Its always been the other way around, tourists pay extra taxes and fees which go back to the city (and residents) and entrepreneurs build hotels which once again benefit the city (and residents). Can't think of many arguments where tourists should be given cheaper housing rights over residents.
reza_n··on Ask HN: Who is hiring? (August 2017)
Varnish Software | Software Engineer | New York City (NYC), NY

C, Linux

Varnish Software is the company behind Varnish Cache, the popular open source caching proxy. Looking for a full time engineer who is comfortable working with Varnish Cache and VCL, C, Linux, HTTP and with client facing interactions. Full benefits, all skill levels considered.

If you are interested, please email: reza AT varnish-software DOT com

reza_n··on CheerpJ Applet Viewer – Runs Java applets without a local Java installation
Same, I just move the meeting to something Linux compatible like Hangouts or GotoMeeting. Also, if not presenting, Webex android/iphone client is also an option.
reza_n··on Toronto eyes plan to crack down on Airbnb-style rentals
Not sure if ride sharing and home sharing are the same thing.

Ride sharing disrupted the cab industry, gives a large amount of the population access to cheap and plentiful transportation, and cars are plentiful too. The loser is the cab industry and the winner is the general population.

Home sharing is disrupting the hotel industry, but its customers are tourists and non locals, and housing stock is very limited. So city populations are going to be paying higher housing costs since they are now competing with entrepreneurs (serving tourists and non locals) for the same units. In theory, rents may continue to increase until they find a balance with hotel rates. Here the losers are hotels and long term renters and the winners are short term renters, property owners, and entrepreneurs.

Different economics at play here.

reza_n··on Nuisance call firm Keurboom hit with record fine
> answering the phone, getting put through to a human being, and wasting their time

Not sure if that is the best strategy. I started doing that a while back only to find I started getting even more calls from a lot of different companies. In my case, they were all credit, loan, and debt related offers. I even had one person tell me in a snarky tone that they will "keep me in the system".

Now I just hang up if its a robocall (opt out if possible) or if its a live person, bluntly tell them I am not interested and why. I now get less calls overall.

reza_n··on Nuisance call firm Keurboom hit with record fine
Same, pretty much all phone calls I get these days are spam. And yes, very frustrating to constantly get calls offering small business loans for my non existent company.

Can anything be done to combat this?

reza_n··on Ask HN: Who is hiring? (May 2017)
Varnish Software | Software Engineer | New York City (NYC), NY

C, Linux

Varnish Software is the company behind Varnish Cache, the popular open source caching proxy. Looking for a full time engineer who is comfortable working with Varnish, C, Linux, HTTP and with client facing interactions. Full benefits, all skill levels considered.

If you are interested, please email: reza AT varnish-software DOT com

reza_n··on How to Host Your Own Private Git Repositories
I do this often. One thing, if you want to have multiple users all working on the same repo, which I believe is a common use case, you have to take group permissions and umask into account. Works really nice.
reza_n··on Ask HN: Who is hiring? (April 2017)
Varnish Software | Software Engineer | New York City (NYC), NY

C, Linux

Varnish Software is the company behind Varnish Cache, the popular open source caching proxy. Looking for a full time engineer who is comfortable working with Varnish, C, Linux, HTTP and with client facing interactions. Full benefits, all skill levels considered.

If you are interested, please email reza@varnish-software.com

reza_n··on Ask HN: How were the super bowl led torches synced?
The audience was doing choreographed moves during certain songs, so it was not random at all.
reza_n··on Ask HN: Who is hiring? (February 2017)
Varnish Software | NYC, NY | Onsite | Fulltime

C, Linux

Varnish Software is the company behind Varnish Cache, the popular open source caching proxy. Looking for a full time engineer who is comfortable working with Varnish, C, Linux, HTTP and with client facing interactions. Full benefits, all skill levels considered.

If you are interested, please email reza@varnish-software.com

reza_n··on Varnish Explained
* Take a look at this blog post [0]. That can cover a lot of different security scenarios. The next step would be linking in an external system (database, API, etc) to better track more complex security policies.

* Standard Varnish usecase, nothing extra needed.

* https://github.com/varnish/varnish-modules vsthrottle

[0] https://info.varnish-software.com/blog/using-varnish-cache-s...

reza_n··on Comparison with Other Frameworks
What's preventing me? My preference for a different kind of separation between data and presentation. No one right or wrong here, just a matter of taste :)
reza_n··on Comparison with Other Frameworks
'For' and 'if' are very basic operations which have equivalent CSS constructs and play extremely well with HTML presentation. I'm not saying your wrong, I'm just saying its a total non issue for designing presentations. Without it, you cannot present modern data (JSON).
reza_n··on Comparison with Other Frameworks
As another reply mentions, its a matter of taste, but for me its the clean seperation between data and presentation. Presentation is generally HTML+CSS. Data and plumbing is JS. This is similar to traditional MVC and works well with mixed dev/designer teams. Dev in JS, design with HTML+CSS. You can liken it to a data API returning data with HTML in it, you now have data and presentation together. Do you want the 2 roles in 1 convenient language? Great, JSX gives you that power. Do you want data and presentation separate, then go with templates.
reza_n··on Cornell wants to drill 2-4mi underground for enhanced geothermal heating
Most geothermal systems have the air go thru a heat exchanger of some kind and energy transfer with the Earth happens via a much more conductive medium, like anti-freeze liquid. This isn't limited to the very rich either, its as common as installing solar panels.
reza_n··on Most olive oils sold in the United States are adulterated or deceptively labeled
Ditto, I have been buying this olive oil for the past 2 years. Its a beautiful olive oil and cooks amazingly well. It was such a relief finding this brand given the amount of choices there are for (bad) olive oil!
reza_n··on Airbnb Is Suing San Francisco to Block Rental Rules
Who would pay for all this extra enforcement? My guess is that a large portion of this short term rental income is untaxed. Can't have both sides, no regulation and no tax. I pay my share when I rent a hotel. (Apologies if airbnb renters are paying the appropriate city, state, and federal taxes).
reza_n··on How to Use Varnish Cache as Secured AWS S3 Gateway
Not one to respond to things like this, but in this case the post was written a little less than 2 weeks ago [0].

[0] https://gist.github.com/rezan/b744c513045ea97e87ab/revisions

reza_n··on How to Use Varnish Cache as Secured AWS S3 Gateway
Starting with Varnish Cache 4.1, backends are dynamic and configurable from VMODs. This means proper DNS support for backends. There is already a DNS backend implementation here [0].

[0] https://github.com/Dridi/libvmod-named

reza_n··on How to Use Varnish Cache as Secured AWS S3 Gateway
Worth mentioning hitch [0] as well.

[0] https://hitch-tls.org/

reza_n··on How to Use Varnish Cache as Secured AWS S3 Gateway
So I wrote that blog post, was intended to be a quick little guide for S3 integration. As for your point regarding caching and bandwidth utilization, this actually comes up a bit, so its a fairly valid point. A lot of times software (and people) are accessing the same S3 asset, multiple times, all on the same network. So by going thru a local cache, you bypass having to reach all the way back to S3.
reza_n··on Is Redlock Safe? Reply to Redlock Analysis
I understand how a fencing token can prevent out of order writes when 2 clients get the same lock. But what happens when those writes happen to arrive in order and you are doing a value modification? Don't you still need to rely on some kind of value versioning or optimistic locking? Wouldn't this make the use of a distributed lock unnecessary?
reza_n··on AI is transforming Google search – the rest of the web is next
RIP big data. Hello AI. Makes sense, data drives a lot of 'AI' tech. I guess what I find amusing is the push from Google to rebrand themselves as an AI company. My guess is it won't be too long until we see everyone else jumping in the AI branding boat. That will kind of dilute a lot of what is being done.
reza_n··on Compilers targeting C - a list of open source compilers that can generate C code
Varnish Cache VCL is compiled into C and dynamically linked in. See -C [0].

[0] https://www.varnish-cache.org/docs/trunk/reference/varnishd....

reza_n··on Wooden high-rises change city skylines as builders ditch concrete
The problem isn't really sounds, its the vibration and shock waves which travel thru the structure. I could never hear my neighbors, but I could hear and feel every heal strike. Loose metal attached to the structure would vibrate (air vents, kitchen items). Wasn't trying to tear down this technology or anything, I guess I just had a really bad experience living in a wood constructed apartment (constructed in 2013, 5 floors) and I pretty much vowed to never live in a multi-family wood constructed structure again.

Edit: page 9 in the parent link addresses this. Extremely poor vibration dampening.

reza_n··on Wooden high-rises change city skylines as builders ditch concrete
Wood framed structures are horrible for dampening the noises from people walking (or stomping) around. I will never live in a wood structure with people living above me, its horrible. This is a non issue with steel and concrete structures.
reza_n··on Concurrency kit – Concurrency primitives and non-blocking data structures in C
It seems like a lot of these data structs are not thread safe. Other than ck_bitmap which seems to be read/write thread safe, ck_array, ck_hs, ck_ht, and parts of ck_ring only allow a single writer in the presence of many readers. Did I misread something here? Still a lot of good stuff here, but not sure if these data structures can be used without external locking.
← PreviousPage 3 of 4Next →