I deployed my meteor app to AWS and I'm still using the free tire. I don't understand how the cost is calculated.
Now I'm expecting more users and I need to know how much it will cost me per user.
Related
I'd like to integrate the Cloudflare R2 (object storage) with my Firebase project.
Normally you would use Firebase Storage but since Google Cloud has some insanely high egress fees, I'd prefer to use Cloudflare R2 as a storage option.
Do you know if Firebase/Google allows such an integration? And if so, how could it be done?
Further, is it possible to use the Cloudflare CDN instead of the Firebase CDN?
I've tried to achieve said integration but so far, I'm kinda clueless.
Firebase Storage and Cloudflare R2 are totally different services and there's nothing like an integration. Firebase security rules work only for Firebase storage and if you use R2, you'll have to update your application as per their data access system.
You would ideally be storing files in either of the 1 places so hat integration are you looking for? You are also charged for number of operations performed so do consider that pricing as well instead of just bandwidth.
Additionally, if your application will be serving a lot of files, consider using Cloud CDN (if using Firebase Storage) that'll significantly reduce egress charges.
We started our planning phase on a new project and we settled on a ASP.NET REST API which should be hosted on Azure. Since none of us has any experience on deployment on Azure (or any other cloud service), I have two questions.
Do you need separate Azure Services for the Database and the API, or might there be a combined "package" for the prototype, which later can be changed easily?
Is there any documentation or are there any examples of the entire deployment process of a simple dummy API and the DB? I have spent the last few hours reading the official documentation and searching around, but I would really love to see some sort of reference, just to ensure I don't miss something.
For now, the best I have found is this and this. This seems rather shallow, so I really hope, that there might be more.
If you're looking for in-depth design an implementation details then I would suggest that the Azure Architecture Center would be an excellent place to start, for hands on experience there are hundreds of free courses available on Microsoft Learn.
Specifically there are sections on API design and API implementation. From the Serverless web application page is:
If you don't need all of the functionality provided by API Management, another option is to use Functions Proxies. This feature of Azure Functions lets you define a single API surface for multiple function apps, by creating routes to back-end functions. Function proxies can also perform limited transformations on the HTTP request and response. However, they don't provide the same rich policy-based capabilities of API Management.
Function Proxies
I would suggest starting with using Azure Functions for your API (you only pay for the number of calls + a combination of CPU, memory, and runtime, but the first 1,000,000 calls per month are free (consumption plan), rather than paying for an Azure App Service to host your API and run all the time but only be utilized some of the time.
Some links that might help:
Build Serverless APIs with Azure Functions
Customize an HTTP endpoint in Azure Functions
There is an excellent summary in this article that states:
For the heavy workloads.
Private(enterprise) API - API Management with a Premium plan.
Public API - Functions Proxy with the Premium plan.
For light/moderate workloads.
Private API -Functions Proxy with the Premium plan.
Public API -Functions Proxy with a Consumption plan and custom warm-up solution.
Then from here you can use a connection string to an Azure SQL DB inside your functions to write to the DB or something like Azure Managed Identity (yes the link is for Azure PostgreSQL but the process will be much the same for Azure SQL).
In terms of deployment you should be looking at using Azure DevOps (or GitHub Actions):
Setting up a CI/CD pipeline for Azure functions (old way - GUI pipelines)
Deploy an Azure Functions app to Azure (new way - YAML pipelines)
Continuous Delivery for Azure SQL DB using Azure DevOps
Another helpful tool to get a gauge of costs is the Azure Pricing Calculator.
I was deploying very small size Cloud Function for testing, there were errors multiple times as I was doing egress network request which were not supported on the Spark plan and some other code related errors.
I upgraded to Blaze plan and was able to deploy the function successfully. Now suddenly my Bandwidth usage under Cloud Storage shot to 412 MB (41% of 1 GB of free tier). Going through other similar questions (will Cloud Function affect Firebase Storage bandwidth usage?) I expected it to increase but is such high increase expected and how do I reduce it?
Also I found here that Cloud Storage also increases for some people: Cloud Storage increasing on deploying Cloud Function. In my case the bytes stored are still 0, can someone explain this to me?
What I am doing is a payment gateway integration on my app and they have asked some code to be run on server side (currently I am doing it on app code itself for testing). I am moving this code to cloud functions. I am just afraid if there was this much increase for this small function and how much I will end up till this goes live?
the storage usage is just for the deployment of the function that is the deployment process. The reason you are seeing 0 storage is because the storage bandwidth is related to deployment (if the function itself does not use storage API), so it will not increase.
you can limit the capacity and quotas for any GCP products by using a budget available in GCP. with that you can set a budget for any Google products by setting an alert. Please refer to this link here: In this way you can set up a limit inturn you can monitor the limits as well.
And also for the Cloud function you can use the above link to set the budget or you can use refer to this link. To estimate the budget for the Cloud Functions.
For the Firebase, Please have a look here for Firebase pricing.Hope this works for you!
I've set a daily spending limit for my Firebase project.
Inside the same project, I added a NodeJS App Engine app.
So I've received this warning:
In that case, all spending limits are ignored?
If Firebase goes to $99999 it won't be stopped?
Thanks..
The warning you receives reflects reality, if your app is deployed in the App Engine Flexible environment. To avoid $99999 surprises, you can create a budget for a GCP project to protect somehow your bill and monitor all of your Google Cloud Platform charges from one place. To see how you create a budget, you may have a look at the "Managing GCP Projects, App Engine Applications, and Billing" documentation page.
I have a progressive web app (pwa) which uses firebase authentication. The back-end app -- a node.js express app hosted on GAE -- needs to perform complex data transformations and multi-step async operations. The pwa could use firestore directly for about a third of the data-related functions, but for the more complex operations, it would need to talk to the express app.
For simplicity, I'd rather have the pwa just use the express app. Would there be much added latency than using firestore directly?
There shouldn't be. Assuming your GAE app is in us-central1, then it will be served from the same data centers as your Cloud Firestore database. The extra hop to your GAE shouldn't add much since it's essentially local.
There might be some minor differences due to things that sit above GAE to handle routing/load-balancing, etc, but it will probably be milliseconds of difference.
The largest difference will likely be from processing time in your node.js app itself.