App Engine Multi-Tenancy SSL and Billing

2019-07-26 07:14发布

So I understand that we can let many clients use our app and we can separate the data for each client using namespaces based on domain names or some other criteria.

Is there also a way to allow different clients to have a different SSL for each domain that's billed separately? and what about the overall billing, is there a way to know how much a client should be billed or is there a way to see resources used per client/domain?

1条回答
ゆ 、 Hurt°
2楼-- · 2019-07-26 07:59

First, to get the the statics of a namespace:

from google.appengine.api import namespace_manager
from google.appengine.ext.db import stats

namespace_manager.set_namespace('')  # Unlock DB from namespace
namespace_stat = stats.NamespaceStat.get_by_key_name(namespace)

statadistics = {
    'bytes': namespace_stat.bytes,
    'entities': namespace_stat.count}

# Please note that statics are not upto date.
# Last update can be read from namespace_stat.timestamp
# read more at https://developers.google.com/appengine/docs/python/datastore/stats

I do not know if multiple SSL domains can be used with GAE. Maybe subdomains with a *.yourdomain.com SSL cert could help you, The Invoice Machine use these approach.

查看更多
登录 后发表回答