4. For the parabola $y^{2}=2 p x(p>0)$, the focus is $F$, the directrix is $l$, and $A, B$ are two moving points on the parabola, satisfying $\angle A F B=\frac{\pi}{3}$. Let the midpoint of segment $A B$ be $M$, and the projection of $M$ on $l$ be $N$. Then the maximum value of $\frac{|M N|}{|A B|}$ is $\qquad$
Let $|F A|=|A M|=x,|F B|=|B N|=y$, then $|A B|^{2}=x^{2}+y^{2}-x y$ $\geqslant \frac{(x+y)^{2}}{2}-\left(\frac{x+y}{2}\right)^{2}=\left(\frac{x+y}{2}\right)^{2} \Rightarrow|A B| \geqslant \frac{x+y}{2}$, equality holds when $x=y$. And $|M N|=\frac{x+y}{2} \Rightarrow \frac{|M N|}{|A B|} \leqslant 1$, that is, the maximum value of $\frac{|M N|}{|A B|}$ is 1.