问题标签 [multi-instance-deployment]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
229 浏览

wix - 多实例安装程序的重大升级

我现在不愿意问这个问题,因为我重复WiX - 对多实例安装进行重大升级......但我希望我的问题能得到回答:)

我有一个具有多个实例的安装程序:

为了清楚起见,每个新版本都使用:

  • 不同的版本号(前 3 个数字中的至少一个不同)
  • 每个实例的不同产品代码
  • 每个实例的升级代码相同
  • 我使用域管理员权限安装每个产品

在每个新版本更改产品代码之前,我对每个版本都使用相同的代码,虽然它有点笨拙(永远保留已删除的组件),但重新安装过程还是成功了。

但是,现在,使用不同版本的后续重新安装会使 msiexec.exe 将所有组件视为丢失,从而导致安装失败。看起来好像是时候过渡到重大升级了!

升级天真的方式

msiexec.exe /i "installer.msi" /n {OLD_VERSION_PRODUCTCODE}

提示虚假信息:

系统管理员已设置策略来阻止此安装。

通过重新安装升级

msiexec.exe /i "installer.msi" /n {OLD_VERSION_PRODUCTCODE} REINSTALL=ALL REINSTALLMODE=vamus

(也尝试过,REINSTALLMODE=amus因为新产品是新安装的,但不是)

将每个组件记录为不存在且未触及任何文件(报告升级成功):

已安装:不存在;请求:空;行动:空

我不知所措——我错过了什么?

0 投票
1 回答
1936 浏览

server - Saas: Single-instance vs Multi-instance vs Single-tenant vs Multi-tenant?

I've been reading about instances and tenants and in the Saas architecture. My questions are as follows (please correct anything that you notice I've gotten wrong with any of the following terms):

1) Instance: Is an instance of a piece of software just a copy of that software with its own database? Is there anything more to it than that?

2) Tenant: Is a tenant a user / group of users that share a common set of access privileges to an individual instance?

3) Single-instance: If a Saas provider offers single-instance service, does this mean that they create only a single instance of their software? Or does it mean that there could be multiple instances, but that each instance can serve multiple tenants? If so, is single-instance the same as multi-tenant?

4) Multi-instance: Does this mean that each instance can serve only one tenant, or can there be multiple instances that each serve multiple tenants? ie. Can a multi-instance service be either single-tenant or multi-tenant?

5) Single-tenant: Does this just mean that an individual instance can serve only one tenant, or does it also imply that there are multiple instances? ie. Can a single-tenant service be both single-instance and multi-instance?

6) Multi-tenant: Does this just mean that an individual instance can serve multiple tenants, or does it imply that there is only a single instance? ie. Can a multi-tenant service be both single-instance and multi-instance?

7) To sum up: Can you have single-instance+single-tenant, single-instance+multi-tenant, multi-instance+single-tenant, and multi-instance+multi-tenant?

0 投票
1 回答
1239 浏览

docker - 在同一个图上绑定两个实例 Janusgraph 时出错

所以我正在尝试部署 2 个 Janusgraph (v 0.3.1) 实例以在 ScyllaDb 后端的相同键空间中插入数据。为此,我使用 docker 部署了 2 个 janusgraph 容器。第一个开始时没有错误,并在我的 ScyllaDb 中创建了键空间,但第二个显示了一些错误。

所以我的 Janusgraph 容器在一个集群上工作,而我的后端在另一个集群上工作。实际上,当我的密钥空间 Scylla 已经创建并且我遇到了同样的问题时,我尝试只使用一个容器来重新启动它。我还发现了一个脚本 clean.groovy,它允许强制关闭打开的图形实例。但是没有任何效果...

我认为所有这些错误都是由此造成的:

这是脚本 clean.groovy

那么有人解决了这个图形问题吗?提前致谢。

0 投票
0 回答
93 浏览

java - 存储需要从多个实例访问的数据的最佳方式

有什么方法可以以最少的开销缓存基本上需要从不同实例不断访问的数据。

我目前正在使用 Mongo,但是每个玩家经常访问它会产生太多开销。问题在于派对,您可以在其中创建一小群玩家并在我们的服务中与他们联系。虽然服务是分片的(在多个实例中拆分),但我无法在本地缓存它们,因为它需要在另一个实例上再次访问(如果一个党员在一个实例上)。

我正在考虑以下方法之一,但我不知道要在哪种类型的数据库中进行搜索。

onJoin:如果没有从 mongo db 加载 pull,则存储在一些可以访问的缓存数据库中,例如 Mongo (Query.field("members." + uuid)),这样我就可以保持高效和有效。

onLeave:如果是最后一个成员,则将其从缓存中删除,并将数据保存到 mongo,为下一次拉取做好准备。

onUpdate:如果发生任何意外情况,它会定期通过某种循环将数据保存在缓存中,以最大程度地减少任何数据丢失。

我已经研究过 Jedis,因为它基本上是一个巨大的哈希图,循环遍历所有条目并检查值是没有好处的,特别是因为我想将它用作可扩展的选项。

0 投票
1 回答
184 浏览

sequence - IBM BPM 8.5 按自定义顺序的多实例序列流

有通过多实例循环分离的贷款任务(参见下面的示例):

如何使序列循环按自定义顺序循环,而不是按索引(0,1,2)而是按dueDate,以便第一个元素将最接近日期2020-05-05,然后是2020-07-07等。

0 投票
0 回答
38 浏览

bash - 等待命令使用什么进程来确定完成了哪个进程?

我在 shell 脚本中有一个 for 循环,运行如下:

我的问题是 $cmd 的形式是:

WAIT 命令等待完成以下哪些进程?都是他们吗?如果不是,我应该如何去做,以便 forloop 的每次迭代只在所有 20 个 SCRIPT 实例完成后运行?

0 投票
3 回答
579 浏览

hash - 如何使用 CDN 和负载均衡器进行文件版本控制?

所以我使用了一个非常简单的 CDN 服务。您指向您的网站,如果您通过他们的主机名调用它,他们会在第一次调用后为您缓存它。

我将它用于我的所有静态内容,例如 JavaScript 文件和图像。

这一切都很完美 - 我喜欢它的维护或设置成本非常低。

推出新版本的 JavaScript 文件时出现问题。如果文件发生变化,新的 JavaScript 文件会自动获得一个新的哈希值。

因为在多个实例上推出并不是同时出现问题。我尝试在此图中对其进行建模:

图表

用一句话来说:

  • 请求以新版本命中服务器
  • 请求带有新版本哈希的 Js 文件
  • CDN 正确检测到文件未缓存
  • CDN 从负载均衡器请求具有新哈希的原始文件
  • 负载均衡器将 CDN 请求提供给随机服务器 - 意外地从旧版本的服务器提供服务
  • CDN 使用新哈希缓存旧版本
  • 每个人都从 CDN 获得旧版本

我知道有一些方法可以解决这个问题 - 即手动将文件上传到带有哈希值的单独存储等。但这需要额外的代码并且有更多的“移动部件”,这使得维护更加复杂。

我希望拥有与正常 CDN 行为一样无缝工作的东西。我想这是在多个实例上运行的网站的常见问题,但我找不到很多关于此的信息。

解决这个问题的常用方法是什么?

编辑

我认为另一种解决方案是以某种方式强制 CDN 转到与原始 html 文件相同的 .js 文件实例 - 但是如何?

0 投票
1 回答
185 浏览

azure - 在 Azure 上构建多实例(专用环境)和多租户应用程序

我必须在 Azure 上实现应用程序的混合模型,其中

  • 少数 (20%) 的客户将拥有专用实例
  • 其他(80%)将基于多租户(共享)模型。

我应该采取什么方法

  • Azure AD(不同的 AAD 租户?) - 我是否应该为每个客户提供不同的防晒服务?我读到一个订阅只能链接到 1 个 Azure AD 租户。
  • 虚拟网络
  • 应用服务
  • 逻辑应用 - 服务总线?

任何帮助将不胜感激。

0 投票
1 回答
272 浏览

react-native - Multiple Instances in React native functional components?

I am using the code of my file

I want to create multiple instances of the the first component so that i can use it as tabs, and i want to save instance of the component.i want that i can create new instance and if i want to use old instance then i get the same data as i left the screen before creating new instance. Can anybody help to create multiple instances of the react functional component. And how can i recover of view instance when i want to see it again.

0 投票
1 回答
265 浏览

spring-boot - 如何使用@PostConstruct 仅在一个实例中调用@Scheduled 方法

  1. 有需要按 cron 计划完成的工作
  2. 必须在 spring boot 应用程序启动时执行与作业中相同的逻辑,因此使用 @PostConstruct 方法
  3. 使用 Shedlock,因为它计划在多个实例中运行应用程序

问题是:如何使 @PostConstruct 方法中的逻辑仅在一个实例中调用而不在其他实例中调用?

我的代码示例: