Using both Dedicated and Listening servers?

Hey I was wondering. I love dedicated servers and I prefer them for sure, but I had the thought of having a feature in my game where it would utilize listening servers if the server that needs to be created only allows for a small number of people. Basically this could be nice because if a server only is meant to contain like a max of 5 players then why spin up a dedicated server and waste money on that when the person playing the game can just host the server? Obviously listening servers can’t host as many players though because they also need to render the graphics, lowering the amt of players that can be in the game at once, but for the servers that don’t need that many players, it should be ideal to just let the player host the server. So my question is this… I know that coding gameplay dedicated server logic is not exactly the same as coding gameplay listening server logic, so is this a bad route to go down? Is it too much? Or is there a simple way of implementing this that someone might be aware of? I also had an even more ambitious idea that would extend off of this idea where listening servers can become dedicated servers. If the people in the listening server exceed a certain amt of people, the game would spin up a dedicated server instance and migrate everyone to play on the dedicated server (a migrating loading screen would odiously be needed for this). This system would be nice because it could save lots of money if for example the players playing on my dedicated servers are spread out thin on each server. Because if that was the case they would all be on listening servers and I wouldn’t have to pay anything to run servers because there are not yet enough people to create a dedicated server. Pretty sure this is too ambitious of an idea but just having at least the first idea would be extremely beneficial.

If you use both listen servers and dedicated servers then you lose all the security that a dedicated server provides. Every client will have everything including the server details so nothing can be hidden away. Also depending on the game the host will always have a huge advantage of no latency or the host won’t be able to host the game due to a router or firewall not being configured correctly.

Migrating a game from a hosted server to a dedicated server sounds like a headache waiting to happen.

Developing a game that works both with a listen server and a dedicated server is not very difficult except if you never took both into consideration. You need to make sure the dedicated server doesn’t try to do any cosmetic things (which it can’t but you can still unintentionally call a function on a widget reference etc if you are not careful)