IPFS Regions and Replications

Choose where and how much to pin

Matt Ober
Matt Ober
Mar 17 · 4 min read

Our team has been hard at work these past few months putting together the next major release for Pinata.

Now, we’re excited to unveil what we’ve worked so hard on.

We’re calling this update: “Regions and Replications”.

Regions and Replications

For users looking for more speed and extra redundancy, Pinata now allows you to replicate your content on multiple nodes and in multiple regions.

Benefits of multiple replications

When retrieving content from IPFS, that content first has to be “found” on the network. The more IPFS nodes replicating a piece of content, the faster that content can be found by other nodes on the network.

Multiple replications are especially helpful for applications that have users running their own IPFS nodes directly from their devices. These user nodes are typically less connected to the IPFS network as a whole and therefore can have a hard time finding content quickly if that content isn’t widely available. In other words, replicating your content on multiple nodes will often result in faster content discovery times for your users.

Benefits of multiple regions

For companies with a global customer base, it’s important to make sure that all of your customers can get content quickly. By letting you replicate content in multiple regions, Pinata allows you to move your content closer to the end user. This means faster retrieval times and a better user experience for users living close to regions you’ve replicated to.

How to replicate your content

There’s a few different ways you can determine how your content gets replicated on Pinata:

Your account level “Pin Policy”

Each Pinata user has a “Pin Policy” associated with their account. This account level pin policy is what each new piece of content will use to determine how it should be replicated. You can view this pin policy by visiting the Account Page.

Here you should see a section titled “PIN POLICY”.

From here, simply change up your pin policy to reflect how many replications you would like in each region. Once this new pin policy is set, all future content pinned to Pinata will replicate according to this account level pin policy by default.

Providing a “Custom Pin Policy” on upload

If you’re uploading a new piece of content to Pinata via our API, you now have the option to pass in a “customPinPolicy” as part of that request. If a customPinPolicy is passed in as part of an upload request, that pin policy will be used instead of the account level pin policy mentioned above. For examples on how to pass in customPinPolicy, check out our documentation.

Changing a pin policy after upload

If you’ve already uploaded content to Pinata and want to change how that content is replicated, you can do so with our hashPinPolicy API endpoint or via the Pin Explorer. To change a replication policy via the Pin Explorer, simply open up the “More Menu” for that content and click “Change Pin Policy” to open up pin policy for that particular piece of content.

Changing the Pin Policy

Checking on the status of your content replications

There are two ways you can check on the status of your content’s replications:

The API

With this update, all calls to the /data/pinList api endpoint will now include the following extra information with each pin entry:

regions: [
{
regionId: (region this content is expected to be pinned in),
desiredReplicationCount: (the number of replications desired in this region for this content),
currentReplicationCount: (the number of times this content has been replicated so far)
}
]

The Pin Explorer

With this update, the Pin Explorer will not have a status icon that indicates the current status of that content’s replications. To see an in depth status of each individual region, simply hover the status symbol to view that content’s replication status in each individual region.

How do regions and replications factor into pricing?

Replications are priced the same as normal storage. Every 1GB of replications counts as an additional 1GB stored per month. So 1GB replicated in two different regions, or 1GB replicated twice in the same region, would count as 2GB stored per month. To read more about replications, check out the Replications Documentation.

Future blogs

Future blog posts will dive into the engineering decisions behind Regions and Replications. If you have any questions or want to learn more, join us in our community. Happy Pinning!

Pinata

The Easiest Way to Use IPFS

Matt Ober

Written by

Matt Ober

CoFounder and CTO of Pinata — Building with IPFS

Pinata

Pinata

The Easiest Way to Use IPFS

More From Medium

More on Blockchain from Pinata

More on Blockchain from Pinata

What is an IPFS Pinning Service?

Mar 26 · 3 min read

More on Blockchain from Pinata

More on Blockchain from Pinata

An IPFS Use Case

Jan 9 · 3 min read

67

More on Blockchain from Pinata

More on Blockchain from Pinata

Off-Chain Data

Dec 17, 2019 · 4 min read

64

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade