淘客熙熙

主题:About load ballance server -- ppw

共:💬17 新:
分页树展主题 · 全看首页 上页
/ 2
下页 末页
  • 家园 About load ballance server

    Server Clustering allows a group of servers to intelligently service requests made to a host name. This high performance architecture allows for significantly greater performance than can be achieved by a single server.

    In addition, if any of the services on a single server fail, the requests will be automatically routed to the remaining server. As a result, downtime related to server failures or administrative maintenance can be significantly reduced or eliminated!

    The servers are in pairs, and each physical server has 4 IP numbers. Also, in addition to the IP addresses bound to the physical servers, there are an additional 4 virtual IP addresses configured on the load balancer.

    When HTTP, FTP or SSL requests are made to any of the virtual IP numbers, the load balancer sends the request to one of the physical servers, provided that server is "up" on that service port. If the server is not responding to that service port, all requests will be automatically sent to the remaining server.

    Examples:

    IPs on Server #1 IPs on Server #2 Virtual IP Protocols

    192.168.1.2 192.168.1.6 mapped to 192.168.1.10 HTTP, FTP, SSL

    192.168.1.3 192.168.1.7 mapped to 192.168.1.11 HTTP, FTP, SSL

    192.168.1.4 192.168.1.8 mapped to 192.168.1.12 HTTP, FTP, SSL

    192.168.1.5 192.168.1.9 mapped to 192.168.1.13 HTTP, FTP,

    a) Create DNS records pointing towards the virtual IP addresses:

    Virtual IP

    www.widgets.com 192.168.1.10

    ftp.widgets.com 192.168.1.11

    secure.widgets.com 192.168.1.12

    b) Create identical web sites, FTP data and SSL sites on both servers and bind the HTTP, FTP and SSL services to IP addresses as follows:

    Server 1 Server 2

    HTTP service 192.168.1.2 192.168.1.6

    FTP service 192.168.1.3 192.168.1.7

    SSL service 192.168.1.4 192.168.1.8

    c) Clients communicate to the server cluster through the virtual IP numbers, and the supported requests are balanced across both real servers by changing the destination address at wire speed:

    这个webapplication怎么在两个server间sync.呀. 感觉上挺悬.

    解决方法1.

    NFS? 一个mount在另一个上.

    解决方案2.

    用distribute的database.

    可行么?

    • 家园 我现在这个项目恰好在用这个东西,

      是用于Sun Java App Server 也就是以前的Sunone。原理是用一个High Availability Database来存储和同步两个AppServer的session和其他你需要同步的信息。然后在webserver中间装一个叫load balance的plugin。

      这样一台Appserver负载过重或死的时候,Web Server会通过Load Balance把请求都送到另外一个上面去。而被你同步的信息是不会丢掉的。

      • 家园 嗯. HA Database

        可以用. 如果用SAN 的HA storage array 的话可以同样的效果.

        我想解决的是 file sharing 的问题.

        就不用去开发数据库了.

        说到JSP, 也很有意思, 国内大点的站, 我印象最深的是chinaren,

        那个速度,

        要说就凭这说什么jap performance 比 php 强, 谁敢相信.

        呵呵.

    • 家园 你是问Web Application如何在所谓的Web Farm

      上运行吗?

      几年前这可能是一个比较棘手的问题,现在已经非常简便了。

      在Server群中运行Web Application的核心是Session如何在多个Server间Sync.简单的说有三个方法:

      1)不使用Server端Session,使用其他技术(QueryString, Hidden virable等等)

      2)使用Centralized database Server存放Session所有Session 变量

      3)使用Centralized Process统一管理Session

      .NET中这些技术都是Built-in的,非常简单。

      这些材料网上很多,你自己可以找些来看!

      • 家园 明知道我不要

        ms. 的solution...

        呵呵.

        • 家园 基本原理是一致的。

          不外乎两种技术:Client side or Server side.常用的就这么几种技术:

          Application

          Session

          Cookies

          Form Post / Hidden Form Field

          QueryString

          这个解决好了,你的Web Application就很容易用多台Server来Host!

          点看全图

          外链图片需谨慎,可能会被源头改

          • 家园 前台用blade server cluster

            后台用SAN , 觉得这事最power的solution,

            不用自己写东西.

            • 家园 你想得太简单了!

              Blade Server和其它Server没什么不一样(除了体积瘦小,密度高以外),一样有Memory Space不能共享的问题。

              点看全图

              外链图片需谨慎,可能会被源头改

              SAN是能让你共享Disk,这不解决任何你所说的问题。

              • 家园 问个问题

                tracking session id当然简单,URL rewritting 也好,cookie也好....

                不过session 要是不能serialize,咋对付阿?

                • 家园 什么样的session 不能serialize?
                  • 家园 这样的session多了去了

                    只要往里面扔两个来历不明的客户定义的object就会出现。

                    他们做的object,祖先就根本没继承serializable IF,出什么问题都是可能的.....

                    • 家园 haha,那你乐子可大了。

                      不能Serialization,那这样的Object就没法在网络上传输,就没法Save到Disk上,更别说Database了。

                      如果性能成为瓶颈,你们就升级Server。128个CPU,1TB Memory的机器不是有吗,这样你们就不用Serialization了,全在内存里呆着。不过,这种计算机一旦crash,那你们将lose everything!

                      • 家园 所以阿~~~这种时候只有这么办

                        严格规定session使用规范,可不能让下人把什么东西都往session里头扔呢......

                        • 家园 其实Serialization很好写。尤其是你们都在Server端,不用

                          太担心Version compatible问题(Serialization主要的一个问题)。

                          我建议你们看看以前的Class,花一些功夫改改,这个问题不难解决。

                          • 家园 要是都由我们能说了算,也就好了

                            大项目这个事儿啊,里面政治成分太多太多。

                            比如指定要使用哪家哪家的报表生成package吧,

                            别家的package,我们怎么敢拆包修改?

                            连decompile都是非法的呢.....

                            俺们能做的,只有限制滥用session一途了。 :(

                            不过从前那时代,websphere在session往DB倒腾的时候,连multi-row都不支持,这种限定session使用范围的策略,反而受到IBM专家的称许,呵呵呵

分页树展主题 · 全看首页 上页
/ 2
下页 末页


有趣有益,互惠互利;开阔视野,博采众长。
虚拟的网络,真实的人。天南地北客,相逢皆朋友

Copyright © cchere 西西河