首页 \ 问答 \ 子网内的Azure负载平衡器(Azure load balancer inside a subnet)

子网内的Azure负载平衡器(Azure load balancer inside a subnet)

我有一个带有子网的VNET,子网中有3个虚拟机,VNET通过VPN连接连接到本地服务器。 本地服务器将向子网的内部IP发送请求。

我想要做的是托管一个没有公共IP的负载均衡器,但在子网范围内有一个IP。 然后,本地应用程序将与单个负载平衡器进行通信,然后将该请求转发到托管子网中应用程序的任何服务器。

任何人都可以告诉我,如果这是可能的,或者如果可能的话替代。


I have a VNET with a subnet, there are 3 VMs in the subnet, the VNET is connected via a VPN connection to an on-premises server. The on-premises server will send requests to an internal IP of the subnet.

What I'd like to do is host a load balancer with no public IP, but has an IP in the subnet range. The on-premises app would then talk to the single load balancer, which would in turn forward the request on to any of the servers hosting my app in the subnet.

Can anyone tell me if this is possible, or an alternative if possible.


原文:https://stackoverflow.com/questions/50129629
更新时间:2021-12-16 11:12

最满意答案

sort是一种基于行的工具,因此在调用它之前不能删除换行符。 但是,您可以用数据排序后的空格替换它们,例如tr

re='^[0-9]+$'
if ! [[ $1 =~ $re ]] ; then
   echo "error: Not a number" >&2; exit 1
else 
   printf "%s\n" $@ | sort -n | tr '\n' ' '
fi

sort is a line-based tool, so you can't remove the linefeeds before you call it. You can however replace them with spaces once the data is sorted, for example with tr :

re='^[0-9]+$'
if ! [[ $1 =~ $re ]] ; then
   echo "error: Not a number" >&2; exit 1
else 
   printf "%s\n" $@ | sort -n | tr '\n' ' '
fi

相关问答

更多
  • 至少有人提到man gitk采用与git rev-list相同的选项,其中包括 --date-order 这个选项类似于--topo-order ,因为没有父节点在它的所有子节点之前,但是除此之外,仍然按照提交时间戳顺序排序。 有关更多信息,请参阅“ 了解gitk指南? ”。 注意:如果-d或--date-order实际上是你之后的参数,那么最好不要使用太多,根据Linus自己(来自lists-archives.com/git或www.spinics.net/lists/git/ ) : 事情是, -- ...
  • 不,你不能...... 但您可以使用相同名称的命令行参数覆盖pom.xml中的属性 No, you can't.. But you can override the properties in your pom.xml with command line parameters by the same name
  • 将评论转录成答案 使用getopt() ,然后检查它与optarg是一位数字( strlen(optarg) == 1 && isdigit(optarg[0]) )。 临时参数解析将引导您进入各种临时问题。 我如何确保它在“-f”选项之后,但是...... 您可以编写类似于以下内容的代码: int opt; while ((opt = getopt(argc, argv, "f:")) != -1) { switch (opt) { case 'f': if (st ...
  • exit(1)将始终被调用,因为它在if语句之外。 尝试这个: 3 || $argc < 3) { print 'Invalid Arguments'; exit(1); } else { print larger($argv[1],$argv[2]); exit(0); } exit(1) will alw ...
  • sort是一种基于行的工具,因此在调用它之前不能删除换行符。 但是,您可以用数据排序后的空格替换它们,例如tr : re='^[0-9]+$' if ! [[ $1 =~ $re ]] ; then echo "error: Not a number" >&2; exit 1 else printf "%s\n" $@ | sort -n | tr '\n' ' ' fi sort is a line-based tool, so you can't remove the linefeeds ...
  • 就像是: my $loopLimit = 1; # default if ($#ARGV >= 1) { for ($i = 1; $i <= $#ARGV; $i++) { if ($ARGV[$i] =~ /^\-/) { if ($ARGV[$i] =~ /\-test/) { # do something } elsif ($ARGV[$i] =~ /\-L(\d+)/) # -L followed b ...
  • 在python中,您可以通过sys访问参数。 做就是了: import sys print sys.argv 它应该以正确的顺序显示所有参数,事实是你将在argv列表中有文件名,这是坏的! 因此,你可以删除它 numbers = sys.argv[1:] 没有第一个元素的副本。 然后,您可以通过此代码对元素进行排序: print sorted(numbers, key=lambda x: float(x)) 它的作用是对元素进行排序,但不是考虑元素本身,而是对它们的浮点值进行排序。 然后您的脚本可以 ...
  • 使用自定义比较器从尝试std::sort std::sort(argv, argv + argc, [](char * const & a, char * const & b) { return atoi(a) < atoi(b); }); Try std::sort from with a custom comparator std::sort(argv, argv + argc, [](char * const & a, char * const ...
  • 在C中,你通过让main取两个参数来处理命令行参数, int main(int argc, char** argv) 其中argc是命令行参数的数量(包括程序本身), argv是指向内存位置的指针,其中argc-1指向具有实际参数的字符串。 例: int main(int argc, char** argv) { printf("The program was executed as %s.\n", argv[0]); printf("The arguments were:\n"); for ...
  • 为了测试下面的批处理代码,我用以下行创建了Input.txt文件: No value provided for Subject Attribute ST, skipped RequestId: 1892 RequestId: "1892" Certificate request is pending: Taken Under Submission (0) Generating certificate request and key for xxxx No value provided for Subject ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)