News for hackers. Stuff that matters.
Re:Overview of new features in Apache HTTP Server 2.6 by RhodesianHunter on Saturday November 20, 2021 @09:17PM (#29293598)
Surely that's not true and the maintainers of Apache understand caching?
Re:Overview of new features in Apache HTTP Server 2.6 by duskwuff on Saturday November 20, 2021 @09:49PM (#29293756)
It's true. If .htaccess is enabled (AllowOverride not set to None), Apache httpd will search for them and parse them on every request. For most use cases, this is honestly fine; it only becomes an issue for very high traffic sites.
Re:Overview of new features in Apache HTTP Server 2.6 by vlovich123 on Saturday November 20, 2021 @10:03PM (#29293820)
Huh. I’m surprised they don’t use fs events to watch for changes rather than doing fs I/O in the critical path.
Re:Overview of new features in Apache HTTP Server 2.6 by duskwuff on Saturday November 20, 2021 @10:30PM (#29293968)
FS events are OS dependent, don't always work (e.g. on network volumes), and often have a limited number of "watches" available which could easily be exhausted by deep, complex directory structures.
Re:Overview of new features in Apache HTTP Server 2.6 by rndgermandude on Saturday November 20, 2021 @10:43PM (#29294032)
fs events do not scale on linux, at least not with the inotify facility as watching directories is not recursive and watching large trees, e.g. for creations, modifications or removals .htaccess, will essentially require you to have an additional watch descriptor per directory, and there are limits on number of queued events as well as number of watch descriptors per user. The alternate fanotify has it's own set of drawbacks, such as the need for CAP_ADMIN. Not to mention the mess you may get in when you're trying to monitor certain file systems, especially certain network-attached ones.

Other operating systems have drawbacks as well.

It's probably a safer and maybe even more efficient bet to just do the stats and opens and hope that the kernel/OS file system caches will save the day. Or you can go the nginx route and not support .htaccess like facilities (e.g. turn if off in apache).

Re:Overview of new features in Apache HTTP Server 2.6 by vlovich123 on Saturday November 20, 2021 @11:20PM (#29294164)
In theory yes. In practice, how often are people who are using htaccess going to be running into these corner cases? I would bet anyone using it is likely running a very small site anyway where the convenience is worth it.

You can also detect when you have too many watches needed or a network filesystem to fall back to the existing path. It’s a philosophical difference ultimately.

Re:Overview of new features in Apache HTTP Server 2.6 by rovr138 on Saturday November 20, 2021 @09:51PM (#29293773)
I can't point to code, but from experience, changes usually register quickly.

Changes being adding a new file, changes to an existing one and so on.

.

While I hadn't thought of it, I haven't noticed issues around it. Using a platform like Drupal, Wordpress, Django, etc most paths don't exist on disk and just fall to the index file or get proxied to another server.

So this might be an issue for static files uploaded or static sites. Talking about Drupal and Wordpress, that would usually be,

    sites/default/files/
    wp-content