8. Given that the quadratic equation with real coefficients $a x^{2}+b x+c=0$ has real roots. Then the maximum value of the positive real number $r$ such that
$$
(a-b)^{2}+(b-c)^{2}+(c-a)^{2} \geqslant r a^{2}
$$

holds is . $\qquad$
8. $\frac{9}{8}$.

Let's assume $a=1$, and the two real roots of the equation $x^{2}+b x+c=0$ are $x_{1}$ and $x_{2}$.
By Vieta's formulas, we have
$$
\begin{array}{l} 
b=-x_{1}-x_{2}, c=x_{1} x_{2} . \\
\text { Then }(a-b)^{2}+(b-c)^{2}+(c-a)^{2} \\
=(1-b)^{2}+(b-c)^{2}+(c-1)^{2} \\
=\left(1+x_{1}+x_{2}\right)^{2}+\left(x_{1}+x_{2}+x_{1} x_{2}\right)^{2}+\left(x_{1} x_{2}-1\right)^{2} \\
=2\left(x_{1}^{2}+x_{1}+1\right)\left(x_{2}^{2}+x_{2}+1\right) \\
=2\left[\left(x_{1}+\frac{1}{2}\right)^{2}+\frac{3}{4}\right]\left[\left(x_{2}+\frac{1}{2}\right)^{2}+\frac{3}{4}\right] \\
\geqslant \frac{9}{8} .
\end{array}
$$

Thus, $r \leqslant \frac{9}{8}$, and the equality holds when $x_{1}=x_{2}=-\frac{1}{2}$.