If Anderson is to shock Federer, who has only lost once before the quarter-finals at Wimbledon in 15 years, he will need to call up the heavy artillery which has served him well at the tournament this year.
That dented the Japanese confidence and Djokovic grabbed the double break to seal set three but the inexorable march to victory that many had predicted did not materialize.
However, Djokovic immediately and emphatically responded with a break to love, and then forged a 4-2 lead when Khachanov fired into the net, only for the Russian to maintain the frenetic nature of the opener with a second break of his own. His record of 34 straight Wimbledon wins when up 2-0 was snapped in the third set, and Federer fell shortly after.
The Serb took the next and fought from a break down in the fourth to win. Federer had 33, 14 of which came in the fifth set, while Anderson finished with 31.
Three-time champion Djokovic was the first man through to the semi-finals, reaching the last four of a major in more than two years by seeing off Japan's Kei Nishikori 6-3 3-6 6-2 6-2 on Centre Court.
Three time victor Novak Djokovic returned to a Grand Slam semi-final for the first time since the 2016 U.S. Open, beating Japan's Kei Nishikori 6-3 3-6 6-2 6-2.
Djokovic rallied to hold and only lost two more games from that point onward as he advanced to his first Grand Slam semi-final since the 2016 US Open.
It was performance of resilience and resolve from the former number one, reminiscent of the player who held all four Grand Slam titles two years ago.
"I didn't harm the grass, I know how I threw the racket". Kei did the same in the fourth set but wasn't warned. (Ramos) said he didn't see it. "I am trying to get in the best possible shape for the biggest possible events and it doesn't come much bigger that Wimbledon".
Nishikori initially stayed with his opponent and hit back in another superb game - but a wild backhand late on handed Djokovic the first set. "I have been building over the last couple of weeks, and the level of tennis I have played in the last couple of months felt like it was getting better and better and I feel like I am peaking at the right moment".
The fifth game of the third set was nearly a mirror of the third game of the second - which Nishikori had held despite three break points. I get the warning, he doesn't - it's not fair.
The 2011, 2014 and 2015 champion was clearly unsettled by the dispute, quickly surrendering the set.
He has also lost all four meetings against the 20-time major victor, failing to win a set off the great Swiss star.
"Double standards, my friend".