Does NGINX read auth_basic_user_file on every connection?

RA ss17 at
Thu Sep 3 05:25:27 UTC 2020


How does NGINX process auth_basic_user_file?

1) Does it read it in entirety on every connection?

2) Does it read it line by line on every connection and stops when a match is found?

3) Does it read it full on start and re-reads it only if the file is changed?

If its either 1 or 2, then is it not very inefficient to read a file on just every connection? If the file has fairly large number of entries (5-10mb), will it not affect the performance of web server in general? There should be some "indexed" approach to this.


More information about the nginx mailing list