App Engine Multi-Tenancy SSL and Billing

旧巷老猫 提交于 2019-12-11 05:36:08

问题


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:


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.



来源:https://stackoverflow.com/questions/15793541/app-engine-multi-tenancy-ssl-and-billing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!