4. As shown in Figure 2, the radii of two concentric circles are $6$ and $10$, respectively. The sides $AB$ and $CD$ of rectangle $ABCD$ are chords of the two circles. When the area of the rectangle is maximized, its perimeter is $\qquad$
4. $\frac{128 \sqrt{34}}{17}$.

Let the centers of these two circles be $O$. Then the area of $\triangle O A D$ is $\frac{1}{4}$ of the area of rectangle $A B C D$. Therefore, when the area of $\triangle O A D$ is maximized, the area of rectangle $A B C D$ also reaches its maximum value.

And $O A, O D$ are constants, $O A=6, O D=10$, so when $O A$ is perpendicular to $O D$, the area of $\triangle O A D$ is maximized.
At this point, the perimeter of rectangle $A B C D$ is $\frac{128 \sqrt{34}}{17}$.