Load Balanced NuGet Gallery

Topics: General
Jul 9, 2012 at 7:12 PM

Can NuGet Gallery be hosted behind a load balancer?  I would like to setup the Gallery on multiple web servers pointing to the same package file share and SQL DB for high availability.

Jul 9, 2012 at 8:16 PM

The public gallery (http://nuget.org) is hosted on Azure and backed by a blob storage. With the default configuration (when you clone our repo), we assume that the packages are located under ~/App_Data/packages so you might need to tweak it around a bit to make it work with a file share. 

Jul 9, 2012 at 8:38 PM

Sounds good about the file share.  I think all I have to do here is set the FileStorageDirectory in the web.config file.

Can the web site be hosted behing a load balancer?  I do understand that the web site needs to run on port 80.  Anything additional that we should be aware of.  For example, does the web site require in memory session state so the load balancer vip must be configured to use sticky sessions.

Thanks again for your help.

Jul 11, 2012 at 4:22 PM

I don't think we use session state in the App. You'd need to share machine keys between the load balanced servers, but I think that's about it.