We introduce dynamic internal message routing algorithm in overlay network used by distributed file system. Messages containing system requests are usually smaller than messages carrying data, but their number is much higher. Each kind of message has special requirements on quality of service. Messages carrying data require high bandwidth. Messages containing system requests are crucial for system function. They manage system operations, like replication, synchronization, locking, and metadata transfer exchange, and consequently, need as low latency as possible. We describe design and implementation of routing algorithm, which takes into account different quality of service requirements based on kind of message. Messages are classified by quality of service requirements. Class of the message determines the chosen route. Proposed concept has been proved on experimental distributed file system developed in the Department. We have verified that optimization of dynamic routing of system request has positive impact on system latency and throughput.