General resource sharing problems in overlay networks