0

we have a server with four users with limited 60TB in/out traffic per month, but we're not splitting the cost evenly and we are wondering if it is possible to limit traffic for each user, based on his contribution in cost (30+30+15+15).

We're using the server mainly as a webserver for files, ftp, megatools and rtorrent.

Is there any way to implement this limitation? or at least monitor the usage per user, so we can ask each user to reduce his usage when close to his limit

Edit: Would it help if we use docker, a container for each person? does docker have the limiting facilities and options?

user206904
  • 141
  • 1
  • 8
  • Do your users have static IP address? – Adil Feb 06 '21 at 12:38
  • ofc :) the server has 1 static ip, and it costs 2.5€ to add extra IPs, ofc we would prefer to avoid the cost of extra ip if we can do the limiting we need without paying, but if ur suggestion works with different IPs, I would still love to hear it :) – user206904 Feb 06 '21 at 14:36

1 Answers1

1

SystemD is able to do all sorts of resource accounting and control, and keeps cgroups for users around (user slices).

It should at least cover the monitoring and capping part.

Related: How to do network accounting using cgroups

fuero
  • 9,413
  • 1
  • 35
  • 40