application/octet-stream Если ещё кому понадобится — это произвольные бинарные данные без привязки к клиентским приложениям. В браузере спросят: скачать или чем открыть? ) </занудство>
This could be a very generic question for many here. The project i'm currently working made me jump into backend development and we don't have any prior expertise on how things work in production. Please consider I'm a newbie in production.
Our's is a Rest Api service. We would like to know how much budget for covering server costs is considered "ok" but not put us in deep losses. We have 2 parts of the Api service(Api 1 & Api 2) where one is free to use and other earns us $ based on usage. We are currently having two approaches Approach 1 1. Cloud Armour - $0.75 per million calls 2. Cloud Endpoints - $3 per million calls 3. Cloud Run + Cloud Functions + Firestore - Avg $1 per million calls
Approach 2 1. 2. Load Balancer - Variable cost based on traffic 3. NGINX - Cloud Compute for Rate Limiting & Routing - Fixed $20/month * 2 instances for HA = $40(This can be the bottleneck. So can increase based on traffic) 4. Cloud Run + Cloud Functions + Firestore - Avg $1 per million calls
Ex: For both Api 1 and Api2 combined 1 Million requests Approach 1 costs around $30 for $250 earned(from api2) - This scales with requests and accounts 12% Approach 2 costs around $50 for $250 earned(from api2) - The cost is nearly fixed with more requests but maintenance exists
For 100Mil Approach 1 costs around $3000 for $25,000 earned(from api2) - This scales with requests and accounts 12% Approach 2 costs around $100 + maintenance(NGINX Scaling required) for $25,000 earned(from api2) - The cost is nearly fixed with more requests but maintenance exists
For us Approach 2 helps us in making sure we don't have huge bills when offering Api 1 for free. But 1. We would like to know Approach 1 will be more beneficial overtime as its more managed? 2. We like to know how usually free parts of an api are handled considering the costs? 3. So till at what point it's ideal to consider for server expenses?