- Home /
How to know if the CCU is at limit (Networking)
Well as the title says, I am new and I want to know how I can know if the CCU is in the limit. and this I want to know during the matchmaking to save the player time.
I repeat, I am new to Networking and from what I understand, the CCU means that you can not join more players, and well I do not have 20 computers to know what is happening (Because i use Personal Edition).
Answer by Bunny83 · May 14, 2018 at 10:27 AM
First of all the CCU limit applies to the matchmaking and relay server service that Unity provides. The actual networking system does not have a limit. Though if you don't use the services Unity provides you would need to handle matchmaking yourself with your own server(s) as well as ensuring players can connect to each other. That's what a relay server may be needed. Otherwise the hosting player would need to forward the game port in his router.
The CCU limit was mainly meant for testing during development but they could be used when you go live. Usually you would officially go live with your game where you have to pay for the traffic your game produces on the Unity services. Read this post and this post for more information. Over here there's a calculator that allows you to estimate the cost you might face when you go live.
I've never used the matchmaking service. I only used uNET locally / with port forwarding. Though it seems that you actually get an error when you try to use the matchmaking / relay service when you run out of CCUs. You may need to analyze the "extendedInfo" string for the actual cause. The easiest solution may be to show this to the user if an action wasn't successful. Keep in mind when you go live you don't have any CCU limits but you have to pay for the traffic. The fee is rather cheap but it depends on your network traffic.
Just to be clear, the CCU limit is bound to the Unity editor license you use. Therefore it's not meant to be a production feature but a free / included tool in your editor to test your networking. In almost all cases when you go live you want to pay for the traffic where you don't have any CCU limits. Keep in mind that when you release a game with the built-in CCU limits that might prevent you from developing further since, as i said, the CCU limit is bound to your license. So when you carry out a closed beta you could use the CCUs you have available. However if you go into open beta you may want to switch to the paid solution since you don't know where it might go.
Finally keep in mind that traffic through the internet is NEVER free. Someone always has to pay for it. Flat rates work on the same principal as insurances work. Everyone pays a fix amount of money and the ISP expects that only a tiny part of the users will actually max out their available bandwidth. The majority of the users are idle 99% of the time. So a few users actually produce a high cost for an intenet provider which all the other users help to finance. Litterally every ISP will throttle your bandwidth if they would run into negative numbers ^^. So don't ever expect to get something for free. Someone has to pay for it. In the case of Unity they finance the free CCUs with a part of the monthly subscription fees of plus and pro users.
It seems that you have the complete reason, and it is also true that the Unity $$anonymous$$atch$$anonymous$$aking is quite useful ... When the Host leaves the game the client automatically disconnects like a losing the connection making it clear that there really is not a server involved (Only for the $$anonymous$$atch$$anonymous$$aking). For now what I will try is to obtain the IP through the $$anonymous$$atch$$anonymous$$aking and once obtained to register it in a database to erase it from the $$anonymous$$atch$$anonymous$$aking list of unity and so it does not occupy space in the CCU.
Also, my script first searches for a match in the matchmaking list, if it does not find any then it creates one. I think it's enough that the "success" condition is false to dictate that there is no space in the CCU.
Your answer
![](https://koobas.hobune.stream/wayback/20220612162620im_/https://answers.unity.com/themes/thub/images/avi.jpg)