This also happens to my realm as well. I also got the "unable to connect world" message. I tried to reset the realm and replace the world with a backup save. But I found out that the game will just showing the message "We are trying to replace your world with a backup" or "Resetting the realm" infinitely and the game was stuck on these messages. Considering that many players are reporting the similar issues in the past few hours, I think that it could be that Mojang's server on realm crashed or ran into trouble.
This also happens to my realm as well. I also got the "unable to connect world" message. I tried to reset the realm and replace the world with a backup save. But I found out that the game will just showing the message "We are trying to replace your world with a backup" or "Resetting the realm" infinitely and the game was stuck on these messages. Considering that many players are reporting the similar issues in the past few hours, I think that it could be that Mojang's server on realm crashed or ran into trouble.