The Tuscan-born midfielders played together at lowly Italian side Cuoiopelli almost 30 years ago and sparred briefly as coaches in Serie A before Spalletti departed Roma for Zenit in 2009.
Allegri soon left Cagliari for Milan, winning the Scudetto at the first time of asking before leading the Rossoneri to second place behind Juventus last season.
Spalletti may have brought two Russian Premier League titles to the Petrovsky Stadium, but a recent run of one win from seven games has raised questions over his position, with Allegri's long-term future in Milan also the subject of debate due to a disappointing return of just two wins from seven outings so far.
But Spalletti believes Wednesday night's Champions League Group C encounter is a gilt-edged opportunity for both tacticians to turn things around.
He told the Gazzetta dello Sport: "(Allegri) is a quality coach and he's always been confident in what he does.
"He still has the same quality that he had as a player. He is the same guy he always was when he's on the touchline.
"Much like (Zenit), our opposition are going through a rough patch.
"So I think that Milan will also try to use this game to restore a semblance of normality and turn their current predicament upside down.
"The result will be crucial for both teams."
Zenit endured a rude awakening in their opening game as Manuel Pellegrini's Malaga claimed a comprehensive 3-0 victory in Andalusia.
Spalletti added: "After the defeat in Malaga, if we struggle through the remaining group games our Champions League campaign will be very difficult.
"The most important thing is that our players rediscover their self-belief and quality because they've lost their way a bit. Everything else will follow.
"All our efforts must go toward getting back to a high level and when we play at our best we can beat anyone."
Wednesday's game offers Allegri's Diavolo the chance to get back among the goals in Europe after the drab goalless draw shared with Anderlecht two weeks ago.
The Rossoneri coach told the Gazzetta dello Sport: "I've always said that this is a balanced group and Milan will vie for qualification with Zenit right until the very end.
"Luciano is proving to be an excellent coach. He came close to winning the Scudetto with Roma and he has managed it in Russia.
"We'll have to be at our best against a side built to win the competition. But our objective is to take all three points."