Over the past few years, our school, HTBLA Kaindorf in Austria, has seen a significant increase in the number of NixOS users. However, recently we’ve been facing an issue where our network is being subjected to rate limits when accessing the NixOS API. Since all of our users share the same public IP, the rate limit affects everyone on the network.
We’ve explored potential solutions, but unfortunately, our school administration does not permit the use of a NixOS cache server or similar infrastructure. I’d like to ask if there is any way to increase the rate limit for institutions or organizations like ours. Is it possible to apply for a higher rate limit, or are there alternative approaches we could consider to work around this issue?
If this forum isn’t the best place to address this concern, I would appreciate any suggestions on where else we should reach out for support.
Could you explain a bit more what you mean by “NixOS API Rate Limiting” ?
Just accessing github or doing something else ? (unfortunately github does have rate limits if you do not use tokens)
You mentioned:
does not permit the use of a NixOS cache server or similar infrastructure
So I assume it is not requests to cache.nixos.org
If you can provide an example, what actions fail due to this rate limit, it could be useful too.
PS seems like Discourse has default limit for account creation by IP around 3:
If it’s nix flake update that gets rate limited, and cache servers are not allowed, then the solution is indeed github access tokens. Unfortunately that is something each user has to do on their own, AFAIK github.com doesn’t provide mass-scale token provisioning.
If they do (and that’s a big if), it won’t be for free.
And if the school is resource-limited (as by far most schools worldwide are) then it’s unlikely they have the funds to pay for it.
Not sure how limited your access to local infra, but if you have some network share available you could also try placing nixpkgs repo clone there and regularly update it.
Then all other users can point their nixpkgs inputs there.
(provided you all understand security implications of that)
Huh, so this is what suffering from success looks like.
sorry I don’t have anything constructive to add to the discussion; I hope your issue is resolved feasibly.
Set up a proxy external to the school somewhere (eg at home if you have the hardware for it), then use that to download the updates
Both options cater to the same high level idea: to hide the school’s public IP behind something more personal (as in each student would set this up for themselves, possibly helped by a document outlining how to do it) and thus get around the rate limiting.
But getting an access token is probably less work per person.
Can you clarify what endpoint is failing? Is the issue with cloning GitHub repositories? Or is the issue with fetching cached artifacts from cache.nixos.org?
I just went through the process of registering a new email (SaaS but not gmail) and a nixos discourse account with that email, all in tor-browser and I somehow didn’t even face captcha (I’m happy). This might have been lucky timing, but it worked.
Organizations with very silly NATs (read: universities) and regions with authorities that circumvent normal functioning of the Internet do exist, and I think it’s very important that “our” infra not select against people in such organizations or regions. IMO we should see your, @Flokkq, school’s situation as a test-case and look into adjusting the limits once we learn more
I also wonder how much sense IP-based rate-limiting makes considering there already is the Discourse’s “trust level” system
EDIT: I had posted a test message here with the new account, then I deleted the account on the “Preferences” page. The message was not preserved but trust me it was here
Ah, okay I had a feeling! I ran into the same thing a while back when I was teaching a class and tried to have my students create GitHub accounts. Have you tried emailing GitHub support and seeing if they can make an exception for traffic coming from the school? This is a pretty common problem so I would be surprised if they didn’t have a quick way to make it work.