I'm not sure I understand what you mean by "base costs" and "on top of instance hours". In standard environment you pay for instance hours in the App Engine sandbox, and as they can scale down to 0 instances, and 28 hours of F1 are free per day, you may even pay nothing. In flexible environment you pay for the virtual machines used by your app. I was referring to standard environment.
The price for every instance is a multiple of the cheapest class (F1/B1), e.g. F2/B2 costs twice as much as F1/B1. But in your billing, all instance hours are converted to F1/B1 hours and billed with $0.05 per hour.
- 10 instance hours F1 x $0.05 = $0.50
- 3 instance hours F2 x $0.10 = $0.30
But your billing will actually show all classes converted to F1/B1. 1 hour of F2 equals 2 hours of F1:
- 16 instance hours x $0.05 = $0.80
Whether you use one service or multiple services doesn't change the pricing. But there can be cases where your app may consume more instance hours because the instances can't be shared across all services.
Service 1: has one instance of F1 running 24/7, and handles the low traffic coming to it. That's 24 hours.
Service 2: performs a job every 1 hour and thus needs to spin up its own F1 instance occasionally, that's another few hours per day.
If you would have a monolithic app (i.e. 1 service), all request handlers would be available in the same instance, and thus the chances are better that you would get away with a single instance for everything together. Hence the better utilization of available (and billed) instances.
But there can be also other cases, where using multiple services would save you cost. For example if only a few request handlers (e.g. background tasks) need 1GB memory, then you would put them into their own service with a bigger class and put all other handlers into a separate service with a cheaper instance class, rather than serving everything with the expensive class.
Either way, for billing all instance hours in your app are lumped together and converted to F1/B1 prices. In this regard, think about the services like having multiple "apps" billed together in the same project.
Well, this explanation hopefully didn't make it worse for you 🙂Just ask again.
Best,
Ani