SipThorDescription

Version 10 (Adrian Georgescu, 09/20/2009 02:32 am)

1 1 Adrian Georgescu
= SIP Thor description =
2 1 Adrian Georgescu
3 1 Adrian Georgescu
[[TOC(SipThorDescription, SipThorPreparations, SipThorInstallation, depth=2)]]
4 1 Adrian Georgescu
5 1 Adrian Georgescu
SIP Thor provides scalability and resilience for [wiki:MSPPreparations Multimedia Service Platform]
6 1 Adrian Georgescu
components. A SIP Thor platform is using the same software components for
7 1 Adrian Georgescu
the interfaces with the end-user SIP devices like SIP Proxy and Media Proxy
8 1 Adrian Georgescu
used by [wiki:MSPPreparations Multimedia Service Platform] but it is using a different architecture
9 1 Adrian Georgescu
to achieve the scalability and resilience in case of failure.
10 1 Adrian Georgescu
11 1 Adrian Georgescu
SIP Thor creates an overlay across multiple IP addresses that can run in
12 1 Adrian Georgescu
different locations, like different data centers or cities or countries. On
13 1 Adrian Georgescu
each node different software can run to perform a different service (like
14 1 Adrian Georgescu
SIP Registrar). The sum of all nodes provide a consolidated platform that can
15 1 Adrian Georgescu
automatically deal with the addition and removal of nodes.
16 1 Adrian Georgescu
17 1 Adrian Georgescu
SIP Thor is running fully automatic once in service, there is no need for
18 1 Adrian Georgescu
monitoring or administrating it as its main purpose is to automatically
19 1 Adrian Georgescu
self-heal in case of failures. The only parameter that the operator needs to
20 1 Adrian Georgescu
monitor in a SIP Thor network is the number of active servers that serve a
21 1 Adrian Georgescu
certain role.
22 1 Adrian Georgescu
23 1 Adrian Georgescu
[[Image(http://www.ag-projects.com/images/stories/ag_images/thor-platform-big.png, width=500)]]
24 1 Adrian Georgescu
25 5 Adrian Georgescu
SIP Thor architecture introduces several new components to the Multimedia Service Platform. To implement its functions SIP Thor implements a dynamic overlay of several logical network entities called '''roles''' installed on multiple physical machines called '''nodes'''. Each node can run one or multiple roles. An example of such role is '''sip_proxy''' or '''media_relay'''. Nodes that advertise SIP Proxy or Media Relay capabilities, will handle the load associated with the SIP and RTP traffic respectively and will inherit the built-in resilience and load distribution provided by SIP Thor design.
26 5 Adrian Georgescu
27 5 Adrian Georgescu
== Scalability ==
28 5 Adrian Georgescu
29 9 Adrian Georgescu
SIP Thor is designed around the concept of super peers, a flat level logical network for each role. The peers are dedicated servers that handle native SIP clients that are unaware of the overlay logic employed by the servers. Internally to the network software, the lookup of a resource (a node that handles a certain subscriber for a given role at the moment of the query) is a one step lookup in a hash table and the call flow of any application that uses SIP Thor involves a maximum of two nodes regardless of the number of nodes, subscribers or devices handled by the SIP Thor network. Shall SIP devices be SIP Thor aware and able to make lookups in the overlay, this could greatly improve the scalability of the overal system as less SIP traffic and less queries will be generated through the network.
30 5 Adrian Georgescu
31 8 Adrian Georgescu
The current implementation allows SIP Thor to grow to accomodate thousands of servers, which can handle the traffic of any size of a real-time communication service deployable in the real world (e.g. if a  SIP Proxy/Registrar server implementation can handle 100K subscribers, 100 nodes (roughly the equivalent of three 19 inch racks of data center equipment) are required to handle 10 million subscribers. The service scalability is in reality limited by the performance of accounting sub-system used by the operator.
32 1 Adrian Georgescu
33 9 Adrian Georgescu
== Load sharing ==
34 9 Adrian Georgescu
35 10 Adrian Georgescu
SIP Thor is designed to share the traffic equally between all available nodes. This is done by simply returning a random limited slice of the DNS records, which are managed internally by a special role '''thor-dns''' on multiple nodes assigned as DNS servers in the network. This simple DNS query/response mechanism achieves a near perfect distribution without introducing any intermediate load balancer.
36 9 Adrian Georgescu
37 2 Adrian Georgescu
== Security ==
38 1 Adrian Georgescu
39 1 Adrian Georgescu
All communication between the nodes of the SIP Thor network is encrypted by using Transport Level Security (TLS). Each node part of the SIP Thor network is uniquely identified by a X.509 certificate provisioned by the operator of the platform. The X.509 certificate and various attributes it contains are used for authentication and authorization of the nodes when they exchange overlay messages within SIP Thor network. 
40 1 Adrian Georgescu
41 2 Adrian Georgescu
== Thor Event server ==
42 1 Adrian Georgescu
43 1 Adrian Georgescu
'''thor-eventserver''' is an event server, which is the core of the messaging system that is used by the SIP Thor network to implement communication between the network
44 1 Adrian Georgescu
members.  The  messaging  system  is based on publish/subscribe messages that are exchanged between network members.  Each entity in the network publishes its own
45 1 Adrian Georgescu
capabilities and status for whomever is interested in the information. At the same time each entity may subscribe to certain types of information which  is  published by the other network members based on the entity's functionality in the network.
46 1 Adrian Georgescu
47 1 Adrian Georgescu
Multiple event servers can be run as part of a SIP Thor network (on different systems, that are preferably in different hosting facilities) which will improve the
48 1 Adrian Georgescu
redundancy of the SIP Thor network and its resilience in the face of network/system failures, at the expense of linearly increasing the  messaging  traffic  with
49 1 Adrian Georgescu
the number of the network members. It is recommended to run at least 3 event servers in a given SIP Thor network.
50 1 Adrian Georgescu
51 2 Adrian Georgescu
== Thor Manager ==
52 1 Adrian Georgescu
53 1 Adrian Georgescu
'''thor-manager''' is the SIP Thor network manager, which has the role of maintaining the consistency of the SIP Thor network as members join and leave the network. The manager  will  publish  the  SIP  Thor  network status regularly, or as events occur to inform all network members of the current network status, allowing them to adjust their internal state as the network changes.
54 1 Adrian Georgescu
55 1 Adrian Georgescu
Multiple managers can be run as part of a SIP Thor network (on different systems, that are preferably in different hosting  facilities), which  will  improve  the redundancy  of  the  SIP Thor network and its resilience in the face of network/system failures, at the expense of a slight increase in the messaging traffic with each new manager that is added. If multiple managers are run, they will automatically elect one of them as the active one and the others will be  idle until the active manager stops working or leaves the network. Then a new manager is elected and becomes the active manager.  It is recommended to run at least 3 managers in a given SIP Thor network preferably in separate hosting facilities.
56 1 Adrian Georgescu
57 2 Adrian Georgescu
== Thor Database ==
58 1 Adrian Georgescu
59 1 Adrian Georgescu
'''thor-database''' is a component of the SIP Thor network that runs on the central database(s) used by the SIP Thor network. Its purpose is to publish the location of the provisioning database in the network, so that other SIP Thor network members know where to find the central database if they need to access information from it.
60 2 Adrian Georgescu
61 1 Adrian Georgescu
== Thor DNS ==
62 1 Adrian Georgescu
63 9 Adrian Georgescu
'''thor-dns''' is a component of the SIP Thor network that runs on the authoritative name servers for the SIP Thor domain. Its purpose is to keep the  DNS  entries for the SIP Thor network in sync with the network members that are currently online. Each authoritative name-server needs to run a copy of the DNS manager in combination with a DNS server. The SIP Thor DNS manager will update the DNS backend database with the appropriate records as nodes join/leave the SIP Thor network,  making  it reflect the network status in realtime.
64 1 Adrian Georgescu
65 2 Adrian Georgescu
== Thor Node ==
66 1 Adrian Georgescu
67 1 Adrian Georgescu
'''thor-node''' is to be run on a system that wishes to become a SIP Thor network member. By running this program, the system will join the SIP Thor network and  become part of it, sharing its resources and announcing its capabilities to the other SIP Thor network members.
68 1 Adrian Georgescu
69 1 Adrian Georgescu
The network can accomodate one or more nodes with this role, SIP Thor takes care automatically of the additions and removal of each instance. The currently supported roles are '''sip_proxy''' in combination with OpenSIPS and '''voicemail_server''' in combination with Asterisk. Other roles are directly built in MediaProxy ('''media_relay'''), NGNPro ('''provisioning_server''') and OpenXCAP ('''xcap_server'''), for these resources no thor-node standalone component is required. 
70 1 Adrian Georgescu
71 2 Adrian Georgescu
== Thor Monitor ==
72 2 Adrian Georgescu
73 2 Adrian Georgescu
'''thor-monitor''' is a utility that shows the SIP Thor network state in a terminal. It can be used to monitor the SIP Thor network status and events. Example:
74 2 Adrian Georgescu
75 2 Adrian Georgescu
{{{
76 2 Adrian Georgescu
SIP Thor network for sipthor.net at 01:33:54 Sun 20 Sep 2009:
77 2 Adrian Georgescu
-------------------------------------------------------------
78 2 Adrian Georgescu
79 2 Adrian Georgescu
  media_relay members:
80 2 Adrian Georgescu
    81.23.228.129  
81 2 Adrian Georgescu
    81.23.228.150  
82 2 Adrian Georgescu
    85.17.186.6    
83 2 Adrian Georgescu
    85.17.186.7    
84 2 Adrian Georgescu
85 2 Adrian Georgescu
  provisioning_server members:
86 2 Adrian Georgescu
    81.23.228.144  
87 2 Adrian Georgescu
    81.23.228.164  
88 2 Adrian Georgescu
89 2 Adrian Georgescu
  sip_proxy members:
90 2 Adrian Georgescu
    81.23.228.129  
91 2 Adrian Georgescu
    81.23.228.150  
92 2 Adrian Georgescu
    85.17.186.7    
93 2 Adrian Georgescu
94 2 Adrian Georgescu
  thor_database members:
95 2 Adrian Georgescu
    10.0.0.131      priority=10  mysql://sipthor:xxxxxx@db-log.dns-hosting.info/sipthor
96 2 Adrian Georgescu
    10.0.0.132      priority=10  mysql://sipthor:xxxxxx@db-log.dns-hosting.info/sipthor
97 2 Adrian Georgescu
    85.17.186.8     priority=50  mysql://sipthor:xxxxxx@10.30.30.8/sipthor
98 2 Adrian Georgescu
99 2 Adrian Georgescu
  thor_dnsmanager members:
100 2 Adrian Georgescu
    80.247.197.195 
101 2 Adrian Georgescu
    81.23.228.150  
102 2 Adrian Georgescu
    85.17.186.8    
103 2 Adrian Georgescu
104 2 Adrian Georgescu
  thor_manager members:
105 2 Adrian Georgescu
    81.23.228.150   priority=50 
106 2 Adrian Georgescu
    85.17.186.8     priority=50 
107 2 Adrian Georgescu
108 2 Adrian Georgescu
  thor_monitor members:
109 2 Adrian Georgescu
    81.23.228.150   myself
110 2 Adrian Georgescu
111 2 Adrian Georgescu
  voicemail_server members:
112 2 Adrian Georgescu
    81.23.228.143  
113 2 Adrian Georgescu
114 2 Adrian Georgescu
  xcap_server members:
115 2 Adrian Georgescu
    81.23.228.144  
116 2 Adrian Georgescu
    81.23.228.164  
117 2 Adrian Georgescu
}}}
118 2 Adrian Georgescu
119 4 Adrian Georgescu
120 4 Adrian Georgescu
== NGNPro ==
121 4 Adrian Georgescu
122 4 Adrian Georgescu
NGNPro component performs the provisioning server role. It saves all changes persistently in the bootstrap database and caches the data on the responsable node at the moment of the change. The network can accomodate multiple nodes with this role, SIP Thor takes care automatically of the additions and removal of each instance.
123 4 Adrian Georgescu
124 4 Adrian Georgescu
NGNPro exposes a [wiki:ProvisioningGuide SOAP/XML interface] to the outside world and bridges them with the distributed data structures employed by SIP Thor nodes.
125 4 Adrian Georgescu
126 2 Adrian Georgescu
== New roles ==
127 1 Adrian Georgescu
128 1 Adrian Georgescu
Adding new roles to the system can be realized programatically by obeying to the SIP Thor API and depending on the way of working of the component that needs to be integrated in the SIP Thor network. In any case the software will need to implement a component that publishes its availability in the network (this task can be programmed outside of the specific software by adding it to the generic thor_node configuration and logic) and must be able to lookup resources in the SIP Thor network and use the results of a lookup  in its own application logic. Depending of the inner-working of the application performed by the new role, other roles may need  to be updated in order to serve it (e.g. adding specific entries into the DNS or moving provisioning data).