loic-sharma / BaGet

A lightweight NuGet and symbol server
https://loic-sharma.github.io/BaGet/
MIT License
2.61k stars 669 forks source link

Mysql storage #777

Open Shamus03 opened 1 year ago

Shamus03 commented 1 year ago

Add a new storage type option that stores package contents in MySql along with the package metadata.

Though MySql is not the best for storing large file contents, this is an alternative to storing package contents in the file system, which should be better for highly-available/distributed use cases.

Shamus03 commented 1 year ago

More information about our use case. We run BaGet in multiple datacenters pointing to a MySql database. Since BaGet only supports saving package contents to the file system, we use a distributed file system to store those documents. However, distributed file systems are not perfect and sparing you the details, we think it would be better for us to store the package contents in our MySql database along with the package metadata so everything is in one place. I think this will not be an uncommon thought.