Skip to main content

Posts

Load Balancers

Layer 4 This level provides the NAT based load balancing There is no content inspection considered in this process  There is no additional computation / memory resource consumption in this process All servers in the load balancer should have the contents like video, secure content as the load balancer can choose any server based on the load. There is less options for customization.  There are some hardware also involved which has proprietary algorithms which does the load balancing.   This system has its benefits based on the domain   Layer 7 This works in the application layer There are many parameters to consider for balancing load across back-end machines There can be a separate media stack of servers that respond to the video or other media requests. There can be servers which deal with sensitive data. The choice of the target server can be based on the request headers, payload etc, thereby giving lot of options to build applications / choose servers with the right configur
Prepared a consolidated list of points for a Business Analyst team to prepare for the requirements gathering for any application or product development. Read more from the below link https://docs.google.com/presentation/d/1gXepQWK8qy8waqEX7HauVBgdQ9GSpxzuReuv015joeQ/edit?usp=drive_web

How to determine total number of open/active connections in Microsoft sql server

This shows the number of connections per each DB: SELECT DB_NAME(dbid) as DBName, COUNT(dbid) as NumberOfConnections, loginame as LoginName FROM sys.sysprocesses WHERE dbid > 0 GROUP BY dbid, loginame And this gives the total: SELECT COUNT(dbid) as TotalConnections FROM sys.sysprocesses WHERE dbid > 0 If you need more detail, run: sp_who2 'Active'

Custom serialization Using Newtonsoft.Json

When using Newtonsoft. Json to serialize objects, we can avoid few properties from being included in the output for some use case and the same property be included in the serialized output in other cases. There's a feature in the Newtonsoft.Json.NET library, that lets us  determine at runtime whether or not to serialize a particular property of a class / object. During the process of creating a class, we have to include a public method named ShouldSerialize{MemberName} returning a boolean value. Json.NET will call that method during serialization to determine whether or not to serialize the corresponding property of the class. If this method returns true, the property will be serialized; otherwise, it will be ignored. The following illustration shows how this can be achieved. The following is a data definition / class that may be serialized using Newtonsoft.Json.Net public class AuthTypeClaimMapViewModel {     [JsonIgnore]     public bool? _canSerializeName { get;

Restoring a Database using bak files and SQL Scripts alone

The following is the script to restore any database from a .bak file without using Sql Server Management Studio -- The database name in the restored bak file should be the same as the one given here RESTORE DATABASE [authserver] FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL11.LOCAL\MSSQL\Backup\database.bak' WITH FILE = 1, MOVE N'authserver' TO N'C:\Program Files\Microsoft SQL Server\MSSQL11.LOCAL\MSSQL\DATA\database.MDF', MOVE N'authserver_LOG' TO N'C:\Program Files\Microsoft SQL Server\MSSQL11.LOCAL\MSSQL\DATA\database.LDF', NOUNLOAD, REPLACE, STATS = 10 GO