Hacker Newsnew | past | comments | ask | show | jobs | submit | lipanski's commentslogin

Berlin - Die Sinfonie der Großstadt (Berlin - Symphony of Metropolis) is by far my favourite.


Yeah non verbal movies like this one, Man with a Movie Camera, Etudes sur Paris, Baraka, Samsara etc. are my favorites !


If this is the nano version then let me share the pico alternatives with you:

* BusyBox httpd [1]

* thttpd [2]

* Lwan Web Server [3]

* gatling [4]

I built and maintain a super tiny Docker image (~158KB) for serving static files [5]. My current implementation is based on Busybox httpd and scratch but I also tried out thttpd in the past, which worked well but came with a high memory footprint in some cases. thttpd was used to serve big projects back in the day but it doesn't seem maintained any more. The other two projects were on my list of things to try out. All these projects should compile to binaries <500KB.

By comparison nano-web builds a 18.5MB image on my machine. In my experience you can't go below 5-6MB with Alpine (scratch is the way to go if you can compile statically) and you can't go below ~500KB with Golang or Rust, at least not for serving http requests (C or ASM is probably the way to go).

Note that I'm not saying that small is always better, it probably depends on your use case and there are reasons for using nginx for a static website as well.

[1] https://www.busybox.net/ [2] https://www.acme.com/software/thttpd/ [3] https://lwan.ws/ [4] https://www.fefe.de/gatling/ [5] https://github.com/lipanski/docker-static-website


OP says of nano-web:

> you can inject configuration variables into it at runtime and access them from within your frontend code

Is there a way to do that with BusyBox httpd or the others?


Let's say you have a personal portfolio website. Single index.html file. Written entirely in vanilla HTML/CSS/JS with zero dependencies whatsoever. Project "pages" are fullscreen slideshows of high-rez images (3200x2000) etc. So basically a handcrafted static site.

Would buying a virtual server and running any one of these mini servers to run your site make it more performant than throwing it on a regular host like Dreamhost?

Like, does the simplicity in the server itself offer ANY speed/performance/latency advantages for a site that is ultimately showcasing big imagery for a folio?


My YT recommendation on the topic is the hilarious but very well docummented BBC series "Supersizers Eat" [1]

[1] https://youtube.com/playlist?list=PL8D56E0F6438B4CE6


My favourite is thttpd [1] which is super tiny, battle-tested and actually meant for the job (and only this job). It's available as a package on most Linux distros.

Serving a static folder `/static` on port `3000` as user `static-user` and with cache headers set to 60 seconds would go like this:

  thttpd -D -h 0.0.0.0 -p 3000 -d /static -u static-user -l - -M 60
Even if you've got Python lying around on every Ubuntu server, I still don't get why you wouldn't use something leaner to serve your static files, as long as it's easy to install/configure. Same goes for most of the runtimes in that list.

[1] https://www.acme.com/software/thttpd/


Because the point is that I want a webserver up now. If I was running something long-term I would just use Caddy anyway.


Yeah, I want a HTTP server up because I need an actual server to test my web app or because I want to send a large file to someone on my local network and don't want to guide them through setting up smb/rsync/whatever and just want to give them a URL.

I don't particularly care about what's least likely to fall over under sustained load or is suitable security wise to expose to the internet, because it's not going to have to deal with either of these things. Being "already installed" on the other hand is a big selling point.



> My favourite is thttpd [1] which is super tiny, battle-tested and actually meant for the job (and only this job). It's available as a package on most Linux distros.

Surprising not on Debian or Ubuntu AFAICT:

* https://packages.debian.org/search?keywords=thttpd

Though it does seem to have this from the same author:

* https://packages.debian.org/search?keywords=mini-httpd

* http://www.acme.com/software/mini_httpd/

There are times that I want to run Let's Encrypt that's not a full-time web server (SMTP, IMAP, etc), and it would be handy to spin up something ad hoc on tcp/80 to do the verification step and then stop it right after.


thttpd has one cool cat badge icon but have you seen its critical path http parsing code?

        /* Read the MIME headers. */
        while ( ( buf = bufgets( hc ) ) != (char*) 0 )
            {
            if ( buf[0] == '\0' )
                break;
            if ( strncasecmp( buf, "Referer:", 8 ) == 0 )
                {
                cp = &buf[8];
                cp += strspn( cp, " \t" );
                hc->referrer = cp;
                }
            else if ( strncasecmp( buf, "Referrer:", 9 ) == 0 )
                {
                cp = &buf[9];
                cp += strspn( cp, " \t" );
                hc->referrer = cp;
                }
            else if ( strncasecmp( buf, "User-Agent:", 11 ) == 0 )
                {
                cp = &buf[11];
                cp += strspn( cp, " \t" );
                hc->useragent = cp;
                }
            else if ( strncasecmp( buf, "Host:", 5 ) == 0 )
                {
                cp = &buf[5];
                cp += strspn( cp, " \t" );
                hc->hdrhost = cp;
Use perfect hash tables for known http headers, because they're perfect.


They require you to use a business email address in order to enter the hackathon (gmail is blocked).


their filtering is not very good, hey.com emails work fine.


Same here, I basically learned how to write POSIX-compliant Shell with the help of ShellCheck. Shell is not a difficult language to learn but it definitely has its oddities and the different flavours (Bash etc.) only add to the confusion.

What people don't always expect is the immense portability that POSIX-compliant Shell offers you. This thing runs on pretty much everything.


I recently installed ClickHouse (part of my self-hosted Plausible setup) and had to modify a record inside the database. At this point my only knowledge of ClickHouse was that it comes with an SQL interface. So I opened up a client and typed "SHOW DATABASES" and guess what - it showed me a list of all databases. Then I typed "USE mydatabase" and I was connected to my database. I typed "SHOW TABLES" and got a list of tables, followed by "DESCRIBE TABLE users" and "UPDATE users SET email_verified = true" (FYI I was trying to avoid having to set up SMTP credentials for Plausible). I was able to use ClickHouse without any prior knowledge because the authors decided to based it on a well-known and fairly simple standard instead of inventing their own.

It felt as good as building Ikea furniture without checking the manual and it's what user/developer experience should be about.


You've used MySQL, I would guess. Personally I like the superficial similarities to basic MySQL syntax in ClickHouse. MySQL and Sybase T-SQL have always struck me as the friendliest SQL dialects.


I second this - it sounds like a massive waste to spin up a Github Actions job in order to trigger a basic request every 5 minutes, 300 times a day.

Why not just use a dedicated uptime service with a free tier? I've been using UptimeRobot [1] in the past - they give you 50 free checks at the same refresh rate of 5 minutes.

[1] https://uptimerobot.com/


I use Uptime Robot too. Been using them for years on the free plan. It's dependable.


Uptime Robot is great. Status Cake is another excellent service with a free/hobbyist/homelab tier.

https://www.statuscake.com/


How about self hosted enterprise GitHub?


Then the issue is getting a GHE license. Maybe if there was a community edition...


You say "spin up" which in my mind implies a whole VM. I think surely actions are just run in sort of a container of some sort like a lambda.

I would think it should be rather efficient to run a github action.


Yes and no. Depends on tenancy requirements. I know with docker and other common Linux container strategies you would want to keep each tenant on their own VM. A container isn’t safe enough.

So if this is your org’s only action. Then you’re probably spinning up a VM. If you have other options. You’re probably not adding any overhead.

(Edit: grammar)


Ya, but I doubt that is the case with actions, because I don't think you really have full access to everything. You provide a yaml file and their software runs that yaml which could easily exclude any dangerous commands. Plus, github offers a hosted runner service where you pay for a dedicated VM to run your actions in. So that makes it seem like actions are probably run together on larger VMs by default.


It is definitely the case with Actions.

> I don't think you really have full access to everything

You do.

> their software runs that yaml which could easily exclude any dangerous commands

Categorizing dangerous commands is impossible to do accurately by just looking at a yaml file.

> Plus, github offers a hosted runner service where you pay for a dedicated VM to run your actions in. So that makes it seem like actions are probably run together on larger VMs by default.

I'm not sure what this means. The paid hosted runners are not any different from the free hosted runners, but free runners can only be used on public repos.


You can also use more secure containarization technologies than native docker, like gVisor, to achieve both lightness and isolation.


I'm pretty sure GitHub actions do use a whole (though probably lightweight) VM. And I think AWS lamdas do as well, or at least used to.


Well, if lambdas are using VMs and have sub-second launch times, I don't think using a lot of github actions would cause much overhead.


This is a common misconception about Lambda and Functions. They don't always give you a fresh container/VM, but Actions does.

https://aws.amazon.com/blogs/compute/container-reuse-in-lamb...

https://docs.microsoft.com/en-us/azure/azure-functions/funct...


They support Linux, Windows, and macOS. Surely that cannot be covered just with containers. On Linux, they allow workflows with a large number of different containers involved and I don't think GH would be happy to debug all Docker-inside-Docker problems. So, I guess there is a control algorithm that keeps up to N (100?) VMs spinned up in a free VM pool with the KPI of VM allocation from the pool to be under X s (5?).

Edit: from https://docs.github.com/en/free-pro-team@latest/actions/crea... "Actions can run directly on a machine or in a Docker container".


On the same note, I'd recommend the very well documented and funny BBC series Supersizers Go: https://youtube.com/playlist?list=PL0815CC4054AB8D12


Airbnb enabled a great range of people to see places they might have never afforded to see before. It managed to commoditize travelling in a similar way low-cost airlines did. On top of that, it enabled regions with no previous tourism revenue to have a slice of the cake. Sure, the company made a good profit while there was a profit to make, but their service benefited consumers as well and I think it did leave a positive impact not only on the travellers but also on some of the communities that understood how to balance its pros and cons.


> Airbnb enabled a great range of people to see places they might have never afforded to see before. It managed to commoditize travelling in a similar way low-cost airlines did.

By running illegal hotels. It's easy to be cheaper when you're breaking the law. The whole thing is a criminal enterprise: without the crime, none of the rest of it works.

> Sure, the company made a good profit while there was a profit to make, but their service benefited consumers as well and I think it did leave a positive impact not only on the travellers but also on some of the communities that understood how to balance its pros and cons.

It benefited their clients at the expense of the surrounding communities. Even if you think the laws those communities set weren't in their interests, they were the legitimate laws of those places. The price of living in a society is respecting the law even when you don't agree with it, and AirBnB et al have been tearing that apart for the sake of their profits.


It also created a market that pushed prices up in residential zones in major cities, kicked out neighbors and screwed up the rental market. For example, in my city, rental offers for residents almost duplicated when COVID hit due to AirBnB rentals being empty. If we're talking about people not affording things, we need to focus on people not affording housing before tourism.

> some of the communities that understood how to balance its pros and cons

AirBnB worked against a lot of those communities that tried to balance the pros and cons

https://www.wired.com/story/inside-airbnbs-guerrilla-war-aga...


I know a guy who airbnb out one of his apartments he rented so he live in a larger nicer apartment. Feels bad that people did that.

I think Airbnb when it first came out was great. Like all things tech (a bit broad of a statement) once it got out into the world in a real way it lost its allure. Facebook was great when it started, reddit, instagram, google, etc. Once people figure out how to co-opt the technology for their own uses (or maybe just the drive for ad revenue kills off all the fun or novelty wears off) it loses its lustre quite a bit. Sorry to be downbeat - technology doesn't feel as fun as it was even like 3-4 years ago let alone back in the 00s or the 90s. Or maybe I'm just aging out.


I feel the same way in the sense that I'm much more cynical about tech than I used to be.

I take solace in the fact that writing code and building things (especially physical world things!) is fun. Web backend is getting duller by the minute, though.


Agree with this. I do get enjoyment out of writing and executing code. Is that just dopamine rewards - I can’t tell.


I guess it’s VC demand for returns. Bootstrapped tech and tech that only takes a small amount of investment doesn’t have to follow this path.


That's a great hack and good for him. It won't last forever.


I live in a huge AirBnb market relative to city size (for scale, the city is 400k people, and we have had more peak listings than the capital which is a huge tourist city itself of 15m people)...it has destroyed the community here. Totally. Every spare of piece of land is built on because properties were converted overnight (against local regulations), aggressive rental practices that you only see in larger cities became commonplace (small three bedroom flats are being broken up into six bedrooms), whole areas of the city are now deserted most of the year, properties lying empty with homeless people lying in the doorstep. I used to live somewhere that was full of families and young people, every single flat in the block is now AirBnb...bar one, which is occupied by a 91-year old woman whose husband recently died of cancer and can't move...she gets treated as "the help" by angry AirBnbers (she has people trying to get in her apartment, ringing her door late at night, etc.) but...

...I don't think that is what angered people. That was bad. But AirBnb not only circumvented the spirit of local laws (taxes being one example), they actually assisted property owners in breaking laws. Not just the spirit of the law. Not just a weird loophole. Because we had a big rental market before AirBnb existed, we had laws that existed for every eventuality but one assumption was that holiday rental companies would comply with local licensing laws...AirBnb refused. So we had a local council, budget cut 70% by central government, having to make the choice about whether to cut care services to disabled and the elderly or cut back on road maintainence, having to employ people to look at listings online and work out where properties were for licensing. Needless to say, that didn't work (the story has a happy ending, the council is introducing fines that will bankrupt property owners for failing to comply, is banning listings altogether in some cases, and has said that more severe measures if neither works).

That is why AirBnb is successful here. People often complain about hotels or the lack of regulations...where I am: every single city had regulations for holiday rentals. AirBnb ignored all of them. AirBnb didn't invent tourism, we had them before and we will have them after, they didn't lead us to become richer. A small group did, everyone else became poorer. And this is a case of a company that only exceeded competitors in its willingness to break and ignore rules, and assisted others in doing the same. I will invest in O&G, miners, social media, gun manufacturers, I don't care...they are just filling a need. Never AirBnb. Even grouped amongst companies doing shitty things (palm oil, payday lending being two that occur immediately), they are definitely up there.


I am one of those people, AirBnB enabled me to travel the world, especially to places I would have never thought to go because I always could fall back on AirBnB for support (and I have, as lousy as it sometimes can be)


> Airbnb enabled a great range of people to see places they might have never afforded to see before.

Hostels have always been cheap. And most of the time, AirBnB is more expensive than a hotel when you include their "cleaning fee". It only works if you have a large party or you're staying someplace a while


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: