High Availability Architecture Generator

Settings Environment Nodes Other Local Area Network (LAN) Heart Beat Network (HBN) Wide Area Network (WAN)
Company Name:
Server Prefix:
LAN Domain Name
WAN Domain Name

URL:

Environment:
		Notes:

		Give different type of servers 20 IPS (0
			x.x.z.0 - server
			----------------------------
			x.x.z.[1-2]11 - cluster 1 (LAN)
			x.x.z.[1-2]21 - cluster 2 (HBN)
			
			HBN - Heart Beat Network
		LAN - Local Area Network (Management and Production)
		WAN - Wide Area Network (DMZ)
		Users/Clients - Desktop or Mobile - Internet - Firewall - DMZ/VPN(Clients) - Firewall - LAN -
		Web -> Business -> Data
		VHD - SQL Shared disk / SAN (Shared Storage) Fiber
		Management 

			Solution must contain these parts

Database	Microsoft SQL 2005 Project	Contains Tables and Stored procedures.
Business	C#	Contains objects generated from tables.
Common	C#, Class	Contains common functions.
Provider	C#	.Procedures - Contains classes generated from database stored procedures
.Security - Contains classes related to database and security.
Also contains other procedures for data manipulations
Website	C#, ASP.NET 2.0 Web Project	Web Site project.

		

Network and Servers -  ()

Databases (DAT) - Failover Cluster


-DAT

10


-DAT01

11 (LAN)

11 (HBN)


-DAT02

12 (LAN)

12 (HBN)

dat.

Services (SVC) - Failover Cluster


-SVC

30


-SVC01

31 (LAN)

31 (HBN)


-SVC01

32 (LAN)

32 (HBN)

svc.

Websites (WEB) - Load Balancer


-WEB

50


-WEB01

51 (LAN)

51 (HBN)


-WEB02

52 (LAN)

52 (HBN)

www./

Clients (RDS) - Remote Desktop


-RDS

70


-RDS01

71 (LAN)

71 (NLB)


-RDS02

72 (LAN)

72 (NLB)


-RDSH01

91 (LAN)

91 (NLB)


-RDSH02

92 (LAN)

92 (NLB)

Domain Servers


-DC01

201


-DC02

202


-WSUS

210


-EXCH

220


-EPO

230


-DFS

240

Other


-ADMIN

202


-ROUTER

202


-MODEM

202 (WAN)


INTERNET

www.google.com

Host Name

Pattern

Name = <Prefix>-<Country>-<City>-<Environment>-<Cluster><Index>.<Domain>

Examples: Company, Great Britain, London, Live, Domain Controller, Cluster Host 01

DC01.company.local

COM-L-DC01.company.local

COM-GB-LND-L-DC01.company.local

Alpha codes defined by official standards:

Country (alpha-2 codes): https://en.wikipedia.org/wiki/ISO_3166-2

GB Cities (alpha-3 codes): https://en.wikipedia.org/wiki/ISO_3166-2:GB

US States (alpha-2 codes): https://en.wikipedia.org/wiki/ISO_3166-2:US

IP Address

Classless Inter-Domain Routing (CIDR)

RFC1918 - Internet Assigned Numbers Authority (IANA) assigned blocks of the IP address space for private networks. Internet registry will never assign external Internet IP addresses from the blocks defined below:

Designation Supernet ID  Mask Bits Mask Address Range Max Hosts CIDR Bit Usage
Enterprise 10.0.0.0 8 255.0.0.0 10.0.0.0 - 10.255.255.255 16,777,214 = 2^(32- 8)-2 00001010.cxxxxxxx.xxxxxxxx.xxxxxxxx
Business 172.16.0.0 12 255.240.0.0 172.16.0.0 - 172.31.255.255 1,048,574 = 2^(32-12)-2 10101100.0001cxxx.xxxxxxxx.xxxxxxxx
Home 192.168.0.0 16 255.255.0.0 192.168.0.0 - 192.168.255.255 65,534 = 2^(32-16)-2 11000000.10101000.cxxxxxxx.xxxxxxxx

Subnet Examples

You can split each supernet address range to different ammount of subnets. For example you can split Business (172.16.0.0/12) range into subnets:

Designation NET ENV Subnet ID Mask Bits Mask Address Range Broadcast
Business     172.16.0.0 18 255.255.192.0 172.16. 0.1 - 172.16.63.254 172.16.63.255
Business LAN LIVE 172.16.10.0 24 255.255.255.0 172.16.10.1 - 172.16.10.254 172.16.10.255
Business LAN UAT 172.16.11.0 24 255.255.255.0 172.16.11.1 - 172.16.11.254 172.16.11.255
Business LAN DEV 172.16.12.0 24 255.255.255.0 172.16.12.1 - 172.16.12.254 172.16.12.255
Business HBN LIVE 172.16.20.0 24 255.255.255.0 172.16.20.1 - 172.16.20.254 172.16.20.255
Business HBN UAT 172.16.21.0 24 255.255.255.0 172.16.21.1 - 172.16.21.254 172.16.21.255
Business HBN DEV 172.16.22.0 24 255.255.255.0 172.16.22.1 - 172.16.22.254 172.16.22.255

Broadcast Address - is an IP Address that allows information to be sent to all machines on a given subnet rather than a specific machine.

Gateway - is a node (a router) on a computer network that serves as an access point to another network. Gateway in most cases gets first available Address on Windows based networks or last Address on Linux based network.

Pattern

Address = <Range>.<System><Environment>.<Group>[.<NIC>]<Cluster> NIC 1 - Odd numbers: 1, 3, 5, ... NIC 2 - Even numbers: 2, 4, 6, ...

Example:

10.10.0.10 = COM Solution LIVE SQL Cluster LAN
10.10.0.11 = COM Solution LIVE SQL Host 01 LAN
10.10.0.12 = COM Solution LIVE SQL Host 02 LAN
10.10.0.21 = COM Solution LIVE SQL Host 01 LNB
10.10.0.22 = COM Solution LIVE SQL Host 02 LNB

10.11.1.30 = COM Solution UAT APP Cluster LAN
10.11.1.31 = COM Solution UAT APP Host 01 LAN
10.11.1.41 = COM Solution UAT APP Host 01 LNB

10.12.2.10 = COM Solution DEV DMZ Cluster LAN
10.12.2.11 = COM Solution DEV DMZ Host 01 LAN
10.12.2.12 = COM Solution DEV DMZ Host 02 LAN

Solution Patterns

Object Type Pattern
Project Name                <company> <solution> <feature> <project>
Project File                <company>.<solution>.<feature>.<project>.<ext>
Solution Namespace                <company>.<solution>.<feature>.<project>
Solution Folder    C:\Projects\<company>\<solution>\<feature>\<project>
Program Path %ProgramFiles%\<company>\<product>
Program Data  %ProgramData%\<company>\<product>
Program Logs  %ProgramData%\<company>\<product>\Logs

     <product> = <solution>\<feature>\<project>

Project Naming Pattern

Type Suffix Description
Console
Console
Command Line Executable
Library
Engine
Shared objects
Library
Controls
Shared controls
LibService
Service
Library which contains service for hosting
Console, WinService
Server
Server
WinApp, WebApp Client Client
WinApp, WebApp Manager Management interface for server and clients
WinApp, WebApp Uater Application to test <feature> projects
WebService API IIS .NET Web Service

Server Patterns and Locations

Hosted Application Type Server Pattern Description
Console, LibService, WinService <com><env>SVC<id> %ProgramFiles%\<company>\<product>
WinApp <com><env>RDS<id> %ProgramFiles%\<company>\<product>\<version>
WebApp, WebService, WebSite <com><env>WEB<id> C:\inetpub\www.<company>.co.uk\<prd>

    <com> – Company:  COM
    <env> – Environment:  L | T | L 
    COM   - Databases (SQL)
    SVC   – Services
    WEB   – Websites
    APP   – Applications (RDS)
    <id>  – Server ID: 01 – 32
    <prd> – product.Replace(" ","")

IP Port Number Pattern

IANA Port Categories:
        0 –  1023 – System or Well Known ports.
     1024 – 49151 – User or Registered ports.
    49152 - 65535 – Dynamic (Private) or Ephemeral Ports.

Port Number Pattern:
    Port = <Solution><Feature><Project><Mode>

Example:
		18700 = COM Solution Messenger Server (LIVE)
		18711 = COM Solution Messenger Client (UAT)

Solution:
     1 – COM Solution
     2 - COM Solution 2
Project:
    80 - Reports Server HTTP
    81 - Reports Server HTTP MEX
    82 - Payments Proxy Server HTTP
    83 - Payments Proxy Server HTTP MEX
    86 - Visual Studio Development Server *
    90 - Messenger (UDP)
    91 - Status Server
    92 – Database (SQL Mirroring)
    93 – SQL Instance
    94 – Solution Win (Form Messenger Receiver).
Type:
     0 – Server
     1 - Client
     2 – SQL Witness (Mirroring Manager)
     3 – SQL Principal (Main Database)
     4 – SQL Mirror (Copy Database)
Mode:
     0 - LIVE
     1 - UAT
     2 - DEV
     3 - DEMO
     4 - DR (Live, UAT, Dev, Demo)

Why ports are different for LIVE, UAT, DEV and DEMO? Because it:
a) Allows to run all services in different modes on same PC (Developer's PC)
b) Separates environments, therefore UAT cannot send data to LIVE by accident.

Port    Project              Type   Mode   Notes
------- -------------------- ------ ------ --------------------
18700 - COM Solution Messenger Server (LIVE)
18701 - COM Solution Messenger Server (UAT)
18702 - COM Solution Messenger Server (DEV)
18703 - COM Solution Messenger Server (DEMO)
18704 - COM Solution Messenger Server (DR)

18710 - COM Solution Messenger Client (LIVE)
18711 - COM Solution Messenger Client (UAT)
18712 - COM Solution Messenger Client (DEV)
18713 - COM Solution Messenger Client (DEMO)
18714 - COM Solution Messenger Client (DR)


Hosts File

You can make shortcut to notepad.exe %WinDir%\System32\drivers\etc\hosts and set to run as Administrator.

# -------------------------------------------------------------
#  Hosts File ()
# -------------------------------------------------------------

127.0.0.1	local.

# -----------------------------
#   Servers
# -----------------------------

10	-DAT.     # Databases Cluster
11	-DAT01.   # Database Cluster Host 01
12	-DAT02.   # Database Cluster Host 02

30	-SVC.     # Services Cluster
31	-SVC01.   # Service Cluster Host 01
32	-SVC02.   # Service Cluster Host 02

50	-WEB.     # Websites Cluster
51	-WEB01.   # Website Cluster Host 01
52	-WEB02.   # Website Cluster Host 02

# -----------------------------
# Domain Servers
# -----------------------------

201	-DC01.  # Domain Server 01
202	-DC02.  # Domain Server 02
210	-WSUS.  # Windows Server Update Services
220	-EXCH.  # MAIL Exchange Services
230	-EPO.   # Anti-Virus ePolicy Orchestrator
240	-DFS.   # Distributed File System (DFS)

70	-RDS.     # Remote Desktop Cluster
71	-RDS01.   # Remote Desktop Cluster Host 01
72	-RDS02.   # Remote Desktop Cluster Host 02

91	-RDSH01.  # Remote Desktop Session Host 01
92	-RDSH02.  # Remote Desktop Session Host 02


Solution Build Requirements

In order to build Dac.Solution solution these components must be installed:

Visual Studio Solution

Data
- Database Projects
DB1
- Company Solution Database1 Project
DB2
- Company Solution Database2 Project
Shared
 
Engine
- Shared class
Business
- Business data objects
Services
Server 1
- Web service
APIs
Engine
- Shared classes used by Messenger client and server (Class Library)
Server
- Transmits data between clients and servers (Console Application & Windows Service)
Client
- Client which connects and communicates with Messenger server (WPF Application)
Manager
- Management interface for Messenger server and clients (WPF Application)
Managers
- Job Distribution Engine
Engine
- Shared classes used by Class Library
Controller
- Management interface for Class Library
Server
- Server (Console Application & Windows Service)
WsStatus
- Status Web Service which runs on Company side.
WebUat
- Uat web server which also contains fake vendors "booking" web service.

 

Project Folders

 

Releases

Configs - Various configuration files (DEV, UAT, LIVE)

1.8.0.0 - Win and Web release

1.9.0.0 - Win and Web release

1.2.0.0 - Win and Web release

...

Resources

AJAX Control Toolkit - Microsoft AJAX

Credit Card Validation - Card validation

EnterpriseLibrary - Microsoft Practices EnterpriseLibrary

HTTP Namespace Manager - Configurations tools for reports

Interop - COM objects used in .NET

Krypton Toolkit - Used in Solution Win

Microsoft Data Connection - SQL UI tools used in Support apps

VSTSDB SQL 2005 Schemas - Schema files for Database projects

 

\\company.com\dfs\IT\Development\Software\Server Software\Microsoft SQL Server 2008 Developer Edition 10.0\Add-ons:

Microsoft SQL Server System CLR Types (part of SQL Server Feature Pack)

Microsoft SQL Server 2008 R2 Management Objects (part of SQL Server Feature Pack)

Microsoft SQL Server 2008 R2 Native Client (part of SQL Server Cumulative Update)

 

RedGate dotNET Reflector: http://www.red-gate.com/products/reflector/

SQL Data Projects Configuration

Note: SQL 2005 projects are available at the moment only.

VS 2010 does very detail comparison between 2 database schemas. It will produce very big list of changes. In order to make life and comparison results much simpler:

  1. Open Visual Studio 2010
  2. Tools -> Options -> Database Tools -> Schema Compare
  3. Switch to [General] tab on the right
  4. Expand "[x] Comparison options" and check
    • [x] Ignore ANSI_NULLS
    • [x] Ignore column collation
    • [x] Ignore column order
    • [x] Ignore comments
    • [x] Ignore file names and paths for files and log files.
    • [x] Ignore file group to which an object belongs
    • [x] Ignore full-text catalogue file path
    • [x] Ignore QUOTED_IDENTIFIERS
  5. Switch to [Object Types] tab on the right
  6. Expand "[x] Ignored object types" and check
    • [x] Database Options

SQL Backup Strategy (Draft)

-- Scheduled events:
-- Full Backup    - Every Day:     Starts: 00:00:00                 (1 per day)
-- Differential   - Every 6 Hours, Starts: 06:00:00, Ends: 23:59:59 (3 per day)
-- TransactionLog - Every Hour:    Starts: 01:00:00, Ends: 05:59:59 (5 per 6 hours)
-- TransactionLog - Every Hour:    Starts: 07:00:00, Ends: 11:59:59 (5 per 6 hours)
-- TransactionLog - Every Hour:    Starts: 13:00:00, Ends: 17:59:59 (5 per 6 hours)
-- TransactionLog - Every Hour:    Starts: 19:00:00, Ends: 23:59:59 (5 per 6 hours)

3226 flag must be switched ON so frequent logs won't flood SQL and Windows Events log.

-- 3226 flag - suppress successful backup operation log entry.
-- DBCC TRACEON (3226, -1) -- Enable global trace flag.
-- DBCC TRACEOFF(3226, -1) -- Disable global trace flag.
-- DBCC TRACESTATUS        -- List enabled trace flags.

Singe Transaction Log backup file (*.trn) must be used for one scheduled event.

SQL Instances and Folders (Draft)

New design:

PROS:

CONS:

Instance Prefix:

Instances:

<ServerName1>\COMINS1[DEV|UAT] Instance of SQL Server 2000

[Dacport]

[Manic]

[Intranet]


Link Servers:

  • "COMINS2" -> <ServerName2>\COMINS2[DEV|UAT]

<ServerName2>\COMINS2[DEV|UAT] Instance of SQL Server 2005

[Solution]

[Signals]


LinkServers:

  • "COMINS1" -> <ServerName1>\COMINS1[DEV|UAT]

Folders:

D:\SQLBACK - backup files (*.bak, *.dif, *.trn)

D:\SQLDATA - data files (*.mdf, *.ndf)

D:\SQLLOGS - log files (*.ldf)