What is Fan-Out Software?
Published: 2023-11-30 16:00:33

Fan-out is a messaging pattern where messages are broadcast in a one-to-many arrangement. A basic example of this pattern can be seen in the functionality of a [Publish/Subscribe messaging system](https://www.pubnub.com/learn/glossary/what-is-publish-subscribe/), as Pub/Sub implies the ability to route messages from a single sender to multiple receivers. 

What is fan-out messaging used for?
-----------------------------------

Fan-out is the distribution of messages by a service or message router to multiple users, often simultaneously. In software and online services, the fan-out of a logic gate output signifies the number of gate inputs it can operate. For instance, a single output may be linked to several inputs.

Types of fan-out service patterns
---------------------------------

A more complex fan-out messaging pattern based on Pub/Sub might be used by a publisher to push messages to all or some of its channels so that various subscribers in separate channels can receive the same message at the same time. This can be useful when a method of across-the-board notification for a related set of subscribers is needed.

Another configuration that implements fan-out can be found in the Push/Pull messaging pattern where real-time events from a single data source need to be sent out in parallel across multiple endpoints. 

### Fan-out message service examples and use cases

Fan-out message routing can be applied to use cases such as replicating monitoring logs from one server to multiple servers, sending notifications to multiple interested parties, or otherwise synchronizing the moving parts of a distributed (or modular) application.

### What is the difference between fan-out write and fan-out read?

A good way to understand the differences between fan-out write and fan-out read is to use a service like Twitter as an example. When you post a tweet, Twitter immediately sends it to all the people who follow you. This is called a fan-out write.

On the other hand, a feed service may wait until a user is actively browsing through their feed before finding and displaying posts that are relevant to them, which is known as a fan-out read.

How can PubNub help you?
========================

This article was originally published on [PubNub.com](https://pubnub.com/guides/what-is-fan-out-software/)

Our platform helps developers build, deliver, and manage real-time interactivity for web apps, mobile apps, and IoT devices.

The foundation of our platform is the industry's largest and most scalable real-time edge messaging network. With over 15 points-of-presence worldwide supporting 800 million monthly active users, and 99.999% reliability, you'll never have to worry about outages, concurrency limits, or any latency issues caused by traffic spikes.

Experience PubNub
-----------------

Check out [Live Tour](https://www.pubnub.com/tour/introduction/) to understand the essential concepts behind every PubNub-powered app in less than 5 minutes

Get Setup
---------

Sign up for a [PubNub account](https://admin.pubnub.com/signup/) for immediate access to PubNub keys for free

Get Started
-----------

The [PubNub docs](https://www.pubnub.com/docs) will get you up and running, regardless of your use case or [SDK](https://www.pubnub.com/docs)