Online Learning For Network Resource Allocation