Re: very large number of Bonjour services
Re: very large number of Bonjour services
- Subject: Re: very large number of Bonjour services
- From: Jens Alfke <email@hidden>
- Date: Mon, 19 May 2014 10:52:37 -0700
On May 18, 2014, at 2:18 AM, justin webster <email@hidden> wrote:
> Will I go to hell for creating hundreds of bonjour NSNetServices?
No — there are a lot of big subnets around that have a lot of Macs on them, and it works out alright. Some important performance / bandwidth optimizations got added circa 2002-03 when Bonjour started getting widely used, especially in iChat, based on experience on large LANs on the Apple campus.
In general the static number of services is less important than the rate of change — if services go online/offline a lot it creates a lot of churn. To a lesser degree the same thing happens if a service changes its TXT record too often (e.g. every few seconds.)
Also, from the client side, simply browsing services is much less expensive than resolving their IP addresses. So be careful not to resolve a service’s address unless you really need to make a connection to it, and don’t keep the resolution task running longer than necessary.
If you do run into scaling issues, you could consider consolidating multiple instances of a service on one Mac into one — maybe you could implement a small agent process that publishes the service, and the actual plugins use XPC to register with that agent.
—Jens
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden