【问题标题】:App Engine Multi-Tenancy SSL and BillingApp Engine 多租户 SSL 和计费
【发布时间】:2013-03-25 11:37:47
【问题描述】:

所以我知道我们可以让许多客户使用我们的应用程序,并且我们可以使用基于域名或其他标准的命名空间来为每个客户分离数据。

是否还有一种方法可以让不同的客户端为每个单独计费的域使用不同的 SSL?那么整体计费呢,有没有办法知道应该向客户收取多少费用,或者有没有办法查看每个客户/域使用的资源?

【问题讨论】:

  • 为什么不为每个客户端运行一个单独的应用程序?让您分离数据、域/SSL 证书、配额和计费。

标签: google-app-engine ssl multi-tenant billing


【解决方案1】:

首先,获取命名空间的静态数据:

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

我不知道 GAE 是否可以使用多个 SSL 域。也许带有*.yourdomain.com SSL 证书的子域可以帮助你,The Invoice Machine 使用这些方法。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-11-17
    • 1970-01-01
    • 2012-07-24
    • 1970-01-01
    • 2019-05-20
    • 2011-08-20
    • 2014-05-06
    • 1970-01-01
    相关资源
    最近更新 更多