开发者

Querying disk usage without impacting the performance

开发者 https://www.devze.com 2023-01-30 01:00 出处:网络
I have an application which allows users to upload files. These files can be uploaded via browser or any tool for bulk uploadin开发者_JS百科g. I need to monitor the storage where files are actually be

I have an application which allows users to upload files. These files can be uploaded via browser or any tool for bulk uploadin开发者_JS百科g. I need to monitor the storage where files are actually being stored and prevent uploading if storage reaches a certain threshold.

But the API available to query disk usage on network share is an unmanaged call which could be costly and will result in slow performance.

Should I make these calls asycn? (If yes, should I do this using dedicated thread or a thread from threadpool?) Should I not get usage stats on each request? (Which is acceptable but how should I manage this?)

0

精彩评论

暂无评论...
验证码 换一张
取 消