Sself-aware and Self-tuning distributed system