Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CloudKit: free public storage and data transfer

Tags:

ios

cloudkit

I would like to understand the CloudKit free usage calculation, but I can't.

Could anyone describe what 40 requests per seconds (10 per 100.000 users) are? I couldn't find any definition what a request is. If I had 2 apps and every app would ping my CloudKit server at the same time, would it result in two requests per second (for the described moment)? How do I know how to limit the request in my apps and how to queue the requests so they can be done later when the time comes where the limit is not reached at the CloudKit server?

What about the 2GB data transfer (50 mb per user)? How should I understand these 50 mb, per second, per day for the eternity? What will happen if one user for one of my apps used 50 mb traffic?

How do I limit my app and still have a good clint server communication? Will I get an error when the limit is reached and won't automatically charged by Apple?

I do really like the programming ease of CloudKit but I'm kinda scared that it could go all way wrong and I will get charged for misunderstanding.

It is really hard for me to imagine how it is calculated.

like image 349
DevAndArtist Avatar asked Oct 02 '15 18:10

DevAndArtist


People also ask

Is Apple CloudKit free?

But in case of CloudKit you don't have to be worried about paying large expenses at all. As it offers a reasonable storage amount completely free.

Where is CloudKit data stored?

You use CloudKit to store your app's existing data in the cloud so that the user can access it on multiple devices. You can also store data in a public area where all users can access it.

What is COM Apple CloudKit?

CloudKit is a framework that lets app developers store key-value data, structured data, and assets in iCloud. Access to CloudKit is controlled using app entitlements. CloudKit supports both public and private databases.

Should I use CloudKit or firebase?

Rules can be set up in the dashboard: CloudKit has a lot of tabs. Summary: Firebase can be immediately accessed without authentication but also provides the flexibility to define your own rules. CloudKit is probably more secure and can provide a seamless experience for your users too, but only if they are using iOS.


1 Answers

I think your biggest concern will be quelled by knowing that you can set usage limits on these services. If you've hit this limit then the service will return an error and you can handle that in your app.

40 requests per second is across all users and devices. If you have 3600 users and they all pinged the server once per hour, that would average out to about 1/second. While that won't be enough to build a service like facebook, instagram, or twitter, it would probably be sufficient for getting weather data, a daily schedule, or food truck locations. For up to 4,000,000 users, the free tier will cover each user checking at most once every three hours with an even distribution.

2GB data transfer is for all of your users. Since the scaling doesn't take effect until you have 100,000 users, 2GB of data transfer is a pretty good amount to get you off the ground. Since it scales at 50MB per user, it's easy to figure out how much you can trust your app to communicate with the server. If just one user goes over but you're still under the total usage then you won't get charged. If you do go over, it's $0.10/GB of data transfer.

You could limit your app to only communicate so much until the user needs to pay for a premium service. If you allowed 50MB/user/month of Data Transfer and let the user know when they approached this limit that they'd have to pay then you'd never go over. You could also have ads on the device that essentially pay for the service to scale thus allowing users who use the app more to have more privileges than passive users but still allowing everyone to have a base usage.

The prices are at the bottom of this page and are fairly reasonable. You can definitely get a cheaper rate if you build things yourself and use AWS, but you'd need to be in the millions of users and/or have high demands for that to be a better option.

like image 172
Fennelouski Avatar answered Nov 13 '22 06:11

Fennelouski