I'm trying to understand how QoS systems work and I'm not sure how exactly would WFQ and WRED interact.
At first, I thought that WFQ is a queuing mechanism and that WRED is a congestion avoidance mechanism. WFQ should schedule packets in queues and WRED is there to drop them when queues are full. If I'm setting up QoS on for example an L3 switch, I'd set up a queuing mechanism and a congestion avoidance mechanism, so I could in theory have WFQ and WRD working together. For example, this document seems to imply that I they would be set up in such way. Some other Cisco documents mention that I could use them independently.
Then I wanted to learn more about how they worked and started searching the Internet. As a result, now I have no idea what they are and how they work.
Some sites (at least to my understanding of the content) claim that packet scheduling algorithms and congestion avoidance algorithms are basically the same. For example in this Wikipedia article, they are all placed in a same group. Some random articles mentioned that I could use WFQ XOR WRED.
So what I wanted to ask is how related are WFQ and WRED? When would I use one or another and when both, if that's even possible?