<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gaurav Rathor on Medium]]></title>
        <description><![CDATA[Stories by Gaurav Rathor on Medium]]></description>
        <link>https://medium.com/@gaurav_4818?source=rss-225d3d4ca6fc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*8r5SG0OmF-UMhOstqVGotw.png</url>
            <title>Stories by Gaurav Rathor on Medium</title>
            <link>https://medium.com/@gaurav_4818?source=rss-225d3d4ca6fc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 03:47:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gaurav_4818/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Implementing Rate Limiting in .NET 9 APIs with Caching and Middleware]]></title>
            <link>https://medium.com/simform-engineering/implementing-rate-limiting-in-net-9-apis-with-caching-and-middleware-c029c158b476?source=rss-225d3d4ca6fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/c029c158b476</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[redis]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[rate-limiting]]></category>
            <category><![CDATA[cache]]></category>
            <dc:creator><![CDATA[Gaurav Rathor]]></dc:creator>
            <pubDate>Mon, 22 Sep 2025 08:01:40 GMT</pubDate>
            <atom:updated>2025-09-22T08:01:40.508Z</atom:updated>
            <content:encoded><![CDATA[<h3>Implementing Rate Limiting in .NET 9 APIs with Caching and Middleware</h3><h4>A step-by-step guide to building a Redis-backed rate limiter in .NET 9 using middleware and caching for scalable, high-performance APIs.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*13yckBHFUKtBuadoXuwJkA.png" /><figcaption>Implementing Rate Limiting in .NET 9 APIs with Caching and Middleware</figcaption></figure><p>When building production-grade APIs, one of the most important concerns is protecting your backend from abuse, spam, or denial-of-service (DoS) attacks. That’s where Rate Limiting comes into play.</p><p>In this post, we’ll build a custom rate limiting middleware in .NET 9, ideal for small to medium workloads running on a single server. We’ll also integrate Swagger UI to easily test our APIs.</p><p><strong>What is Rate Limiting?</strong></p><p>Rate limiting defines how many requests a client can make to your API within a defined time window.</p><p>Imagine this rule:</p><blockquote>A user can only make 5 requests per minute.</blockquote><p>If they exceed this limit, the API will respond with 429 Too Many Requests.</p><p><strong>Why Use Rate Limiting?</strong></p><ul><li>Prevent brute-force or DDoS attacks</li><li>Ensure fair usage among users</li><li>Reduce backend load</li><li>Improve reliability and performance</li></ul><h3><strong>Rate Limiting Algorithms</strong></h3><h4>Token Bucket Limiter</h4><p>The <strong>Token Bucket algorithm</strong> is one of the most commonly used rate limiting strategies. Imagine a bucket that slowly fills with tokens at a fixed rate. Each incoming request requires a token to proceed, and if the bucket is empty, the request is denied (or delayed, depending on configuration).</p><ul><li>The bucket has a <strong>maximum capacity</strong> (burst size).</li><li>Tokens are <strong>added at a fixed rate</strong> until the bucket is full.</li><li>Each request <strong>consumes one token</strong> from the bucket.</li><li>If no tokens are available, the request is <strong>rejected with 429</strong> (Too Many Requests).</li></ul><p>This approach is <strong>flexible</strong>: it enforces a steady rate but also allows short bursts of traffic as long as tokens are available.</p><p>Example use case: API endpoints that usually have low traffic but need to handle occasional bursts (e.g., login attempts, batch processing).</p><pre>options.AddTokenBucketLimiter(&quot;TokenBucketLimiter&quot;, opts =&gt;<br>{<br>    opts.TokenLimit = 1;                        // Max burst<br>    opts.TokensPerPeriod = 10;                  // Tokens replenished per period<br>    opts.ReplenishmentPeriod = TimeSpan.FromMinutes(1);<br>    opts.QueueLimit = 0;<br>    opts.QueueProcessingOrder = QueueProcessingOrder.OldestFirst;<br>    opts.AutoReplenishment = true;<br>});</pre><h4>Fixed Window Limiter</h4><p>The <strong>Fixed Window algorithm</strong> is the simplest rate limiting strategy. It divides time into discrete intervals and enforces a maximum request count within each interval.</p><ul><li>The time is split into <strong>fixed windows</strong> (e.g., 100 requests per minute).</li><li>Requests are <strong>counted within the current window</strong>.</li><li>Once the limit is reached, <strong>further requests are blocked</strong> until the next window starts.</li></ul><p>It is easy to implement but suffers from the <strong>boundary problem</strong>: if requests arrive at the end of one window and the beginning of the next, the system may allow more requests than expected.</p><p>Despite this, it is efficient and often used in <strong>simple API throttling</strong> scenarios.</p><p>Example use case: <strong>Basic rate limiting</strong> for APIs where occasional spikes are acceptable (e.g., free-tier services, internal tools).</p><pre>options.AddFixedWindowLimiter(&quot;FixedWindowLimiter&quot;, opts =&gt;<br>{<br>    opts.PermitLimit = 2;                     // Allow 2 requests<br>    opts.Window = TimeSpan.FromMinutes(1);    // Per 1 minute window<br>    opts.QueueLimit = 0;                      // Queue Limit 0<br>});</pre><h4>Sliding Window Limiter</h4><p>The <strong>Sliding Window algorithm</strong> improves accuracy by tracking requests over a continuously moving time frame instead of resetting at fixed intervals.</p><ul><li>The time window (e.g., 1 minute) is <strong>divided into smaller segments</strong> (e.g., 10 seconds each).</li><li>When a request arrives, the limiter <strong>counts all requests within the last full window</strong>.</li><li>Unlike fixed windows, the window <strong>“slides” with time</strong>, providing a more accurate rate measurement.</li><li>This reduces the “boundary problem” where too many requests could be allowed at the edge of two fixed windows.</li><li>It ensures a <strong>fairer distribution</strong> of allowed requests across time.</li></ul><p>Example use case: APIs where <strong>fairness and accuracy</strong> matter (e.g., financial transactions, stock trading systems).</p><pre>options.AddSlidingWindowLimiter(&quot;SlidingWindowLimiter&quot;, opts =&gt;<br>{<br>    opts.PermitLimit = 4;                      // Allow 4 requests<br>    opts.Window = TimeSpan.FromMinutes(1);     // Within 1 minute<br>    opts.SegmentsPerWindow = 3;                // 3 Segments Per Window<br>    opts.QueueLimit = 0;                       <br>});</pre><h4>IP-Based Rate Limiting</h4><p><strong>IP-based Rate Limiting</strong> is a strategy that restricts the number of requests a single IP address can make within a defined time frame.</p><ul><li>Each request is tracked by the user’s IP address.</li><li>A limit is set (e.g., 50 requests per minute per IP).</li><li>Once the limit is reached, further requests from that IP are blocked or delayed until the window resets.</li></ul><p>It helps prevent abuse such as DDoS attacks, brute-force attempts, or spamming.</p><p>Simple to implement but can be bypassed if attackers use multiple IPs (e.g., via proxies or botnets).</p><p>Despite this, it is widely used for API protection, login security, and fair usage enforcement.</p><p><strong>Example use case</strong>: Limiting login attempts from a single IP address (e.g., max 5 attempts per minute) to prevent brute-force attacks.</p><pre>options.AddPolicy(&quot;IPBasedRateLimiter&quot;, context =&gt;<br>{<br>    var ipAddress = context.Connection.RemoteIpAddress?.ToString() ?? &quot;unknown&quot;;<br><br>    return RateLimitPartition.GetFixedWindowLimiter(<br>        partitionKey: ipAddress,<br>        factory: _ =&gt; new FixedWindowRateLimiterOptions<br>        {<br>            PermitLimit = 7,                      // 7 requests<br>            Window = TimeSpan.FromMinutes(1),     // per 1 min<br>            QueueLimit = 0<br>        });<br>});</pre><h4>Policy Based Rate Limiting</h4><p>A policy is a set of rules (limit, window, queue behavior, partitioning, etc.)</p><p>You can define multiple policies for different use cases (login, API key, IP-based, global, etc.).</p><p>Then you apply a policy to endpoints (globally or per-route).</p><pre>options.AddPolicy(&quot;CustomPolicy&quot;, context =&gt;<br>    RateLimitPartition.GetFixedWindowLimiter(&quot;CustomPolicy&quot;, _ =&gt; new FixedWindowRateLimiterOptions<br>    {<br>        PermitLimit = 1,                   // only 3 attempts<br>        Window = TimeSpan.FromMinutes(1)   // per minute<br>    }));</pre><h4>Global Rate Limit</h4><p>A global rate limit applies across your entire API. Every request from a client — no matter which endpoint they hit — counts toward the same quota.</p><p><strong>Example</strong>:</p><ul><li>Allow a maximum of <strong>100 requests/minute per IP</strong> across the whole API.</li></ul><p>If a client sends requests to /login, /users, /products combined, they still share that same quota.</p><pre>options.GlobalLimiter = PartitionedRateLimiter.Create&lt;HttpContext, string&gt;(context =&gt;<br>{<br>    string partitionKey = context.Request.Headers[&quot;X-API-Key&quot;].FirstOrDefault()<br>        ?? context.User.FindFirst(&quot;sub&quot;)?.Value<br>        ?? context.Connection.RemoteIpAddress?.ToString()<br>        ?? &quot;anonymous&quot;;<br><br>    return RateLimitPartition.GetTokenBucketLimiter(partitionKey, _ =&gt; new TokenBucketRateLimiterOptions<br>    {<br>        TokenLimit = 10,<br>        TokensPerPeriod = 10,<br>        ReplenishmentPeriod = TimeSpan.FromSeconds(10),<br>        QueueLimit = 0,<br>        QueueProcessingOrder = QueueProcessingOrder.OldestFirst,<br>        AutoReplenishment = true<br>    });<br>});</pre><h4><strong>Endpoint-Specific Rate Limits</strong></h4><p>A rule that applies only to specific routes (endpoints).</p><p>Protects sensitive or expensive endpoints (like /login or /checkout) without restricting harmless endpoints (like /status).</p><p><strong>Example</strong>:</p><ul><li>/login: max <strong>5 requests/minute per IP</strong></li><li>/products: max <strong>50 requests/minute per IP</strong></li></ul><pre>// Login attempts<br>options.AddFixedWindowLimiter(&quot;LoginLimiter&quot;, opts =&gt;<br>{<br>    opts.PermitLimit = 3;                     <br>    opts.Window = TimeSpan.FromMinutes(1);  <br>    opts.QueueLimit = 0;<br>});<br><br>// Weather API calls<br>options.AddSlidingWindowLimiter(&quot;WeatherLimiter&quot;, opts =&gt;<br>{<br>    opts.PermitLimit = 5;                      // Allow 5 requests<br>    opts.Window = TimeSpan.FromMinutes(1);     // Within 1 minute<br>    opts.SegmentsPerWindow = 3;                // More granular tracking<br>    opts.QueueLimit = 0;<br>});</pre><h4><strong>Handling </strong><strong>Retry-After Headers in .NET 9 Rate Limiting</strong></h4><p>When a client exceeds your rate limit, the API should not just return 429 Too Many Requests.<br> It should also tell the client <strong>how long to wait before retrying</strong>. That’s where the Retry-After header comes in.</p><h4>What is the Retry-After Header?</h4><p>It’s an <strong>HTTP response header</strong> that informs the client when they can safely retry a request.<br> There are <strong>two formats</strong>:</p><p>1. <strong>Relative (seconds):</strong></p><pre>Retry-After: 30</pre><p>The client should retry after 30 seconds.</p><p>2. <strong>Absolute (HTTP-date):</strong></p><pre>Retry-After: Wed, 27 Aug 2025 12:30:00 GMT</pre><p>The client should retry after the given timestamp.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CPawwnrv-ogpV2BlZwAU9g.png" /></figure><h4><strong>Add Custom Headers</strong></h4><blockquote><strong>X-Rate-Limit-Limit</strong> → The maximum number of requests allowed in the current window.</blockquote><blockquote><strong>X-Rate-Limit-Remaining</strong> → How many requests the client can still make before hitting the limit.</blockquote><blockquote><strong>X-Rate-Limit-Reset</strong> → The time (in seconds or as a timestamp) when the limit will reset.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e20MgH7VOmOBKEuTIsIRsQ.png" /></figure><h3><strong>Implementing Rate Limiting in .NET 9</strong></h3><p>Let’s walk through the setup step-by-step.</p><p><strong>Step 1: Create a .NET 9 Web API</strong></p><pre>dotnet new webapi -n RateLimitingDemo<br>cd RateLimitingDemo</pre><p><strong>Step 2: Install Swagger</strong></p><pre>dotnet add package Swashbuckle.AspNetCore</pre><p><strong>Step 3: Add the RateLimitEntry.cs</strong></p><pre>namespace RateLimitingBlogDemo.Models<br>{<br>    public class RateLimitEntry<br>    {<br>        public int Count { get; set; }<br>        public DateTime StartTime { get; set; }<br>    }<br>}</pre><p><strong>Step 4: Add the Rate Limiting Middleware</strong></p><pre>using Microsoft.Extensions.Caching.Memory;<br>using RateLimitingBlogDemo.Models;<br><br>namespace RateLimitingBlogDemo<br>{<br>    public class RateLimitingMiddleware<br>    {<br>        private readonly RequestDelegate _next;<br>        private readonly IMemoryCache _cache;<br>        private readonly int _limit = 5; // limit of requests<br>        private readonly TimeSpan _period = TimeSpan.FromMinutes(1);<br><br>        public RateLimitingMiddleware(RequestDelegate next, IMemoryCache cache)<br>        {<br>            _next = next;<br>            _cache = cache;<br>        }<br><br>        public async Task InvokeAsync(HttpContext context)<br>        {<br>            var ipAddress = context.Connection.RemoteIpAddress?.ToString() ?? &quot;unknown&quot;;<br>            var cacheKey = $&quot;RateLimit_{ipAddress}&quot;;<br><br>            var entry = _cache.GetOrCreate(cacheKey, entry =&gt;<br>            {<br>                entry.AbsoluteExpirationRelativeToNow = _period;<br>                return new RateLimitEntry { Count = 0, StartTime = DateTime.UtcNow };<br>            });<br><br>            if (entry?.Count &gt;= _limit)<br>            {<br>                context.Response.StatusCode = StatusCodes.Status429TooManyRequests;<br>                await context.Response.WriteAsync(&quot;You have sent too many requests. Please try again later.&quot;);<br>                return;<br>            }<br><br>            entry.Count++;<br>            _cache.Set(cacheKey, entry);<br><br>            await _next(context);<br>        }<br>    }<br>}</pre><p><strong>Step 5: Register Middleware in Program.cs</strong></p><pre>app.UseMiddleware&lt;RateLimitingMiddleware&gt;();</pre><p><strong>Step 6: Test with Sample Controller</strong></p><pre>using Microsoft.AspNetCore.Mvc;<br><br>namespace RateLimitingDemo.Controllers<br>{<br>    [ApiController]<br>    [Route(&quot;[controller]&quot;)]<br>    public class WeatherForecastController : ControllerBase<br>    {<br>        private static readonly string[] Summaries = new[]<br>        {<br>            &quot;Freezing&quot;, &quot;Bracing&quot;, &quot;Chilly&quot;, &quot;Cool&quot;, &quot;Mild&quot;, &quot;Warm&quot;, &quot;Balmy&quot;, &quot;Hot&quot;, &quot;Sweltering&quot;, &quot;Scorching&quot;<br>        };<br><br>        private readonly ILogger&lt;WeatherForecastController&gt; _logger;<br><br>        public WeatherForecastController(ILogger&lt;WeatherForecastController&gt; logger)<br>        {<br>            _logger = logger;<br>        }<br><br>        [HttpGet(Name = &quot;GetWeatherForecast&quot;)]<br>        public IEnumerable&lt;WeatherForecast&gt; Get()<br>        {<br>            var weathers = Enumerable.Range(1, 5).Select(index =&gt; new WeatherForecast<br>            {<br>                Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)),<br>                TemperatureC = Random.Shared.Next(-20, 55),<br>                Summary = Summaries[Random.Shared.Next(Summaries.Length)]<br>            })<br>            .ToArray();<br>            return weathers; <br>        }<br>    }<br>}</pre><p><strong>Step 7: See Output</strong></p><p>For 5 request below output will come :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*ORyXijmYosYO-zbkIZ4bIg.png" /></figure><p>But after a limit is exceeded, the following rate-limiting error will display in response:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zs-f58H1hXDvW6NEXTOdvw.png" /></figure><h4><strong>Limitations:</strong></h4><p>This uses in-memory caching — it’s not suitable for distributed systems or multiple servers.</p><p>For distributed rate limiting, use Redis, Rate Limiting libraries (like AspNetCoreRateLimit), or API Gateway solutions.</p><h3><strong>Implementing JWT Authentication and Custom Rate Limiting in .NET 9</strong></h3><p>Let’s walk through the setup step-by-step.</p><p><strong>Step 1: Setting Up JWT Authentication</strong></p><p>Create a new AuthService.cs file.</p><pre>using Microsoft.IdentityModel.Tokens;<br>using System.IdentityModel.Tokens.Jwt;<br>using System.Security.Claims;<br>using System.Text;<br><br>namespace RateLimitingBlogDemo.Services<br>{<br>    public class AuthService<br>    {<br>        private readonly IConfiguration _config;<br><br>        public AuthService(IConfiguration config)<br>        {<br>            _config = config;<br>        }<br><br>        public string GenerateJwtToken(string username)<br>        {<br>            var jwtKey = _config[&quot;Jwt:Key&quot;];<br>            var securityKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(jwtKey));<br>            var credentials = new SigningCredentials(securityKey, SecurityAlgorithms.HmacSha256);<br><br>            var claims = new[]<br>            {<br>                new Claim(JwtRegisteredClaimNames.Sub, username),<br>                new Claim(JwtRegisteredClaimNames.Jti, Guid.NewGuid().ToString())<br>            };<br><br>            var token = new JwtSecurityToken(<br>                issuer: null,<br>                audience: null,<br>                claims: claims,<br>                expires: DateTime.UtcNow.AddMinutes(30),<br>                signingCredentials: credentials);<br><br>            return new JwtSecurityTokenHandler().WriteToken(token);<br>        }<br>    }<br>}</pre><p><strong>Step 2: Update Program.cs file for JWT Authentication</strong></p><pre>var jwtKey = builder.Configuration[&quot;Jwt:Key&quot;];<br>var keyBytes = Encoding.UTF8.GetBytes(jwtKey);<br><br>builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)<br>    .AddJwtBearer(options =&gt;<br>    {<br>        options.TokenValidationParameters = new TokenValidationParameters<br>        {<br>            ValidateIssuer = false,<br>            ValidateAudience = false,<br>            ValidateLifetime = true,<br>            ValidateIssuerSigningKey = true,<br>            IssuerSigningKey = new SymmetricSecurityKey(keyBytes)<br>        };<br>    });</pre><p><strong>Step 3: Add the Built-in rate Limiter in the Program.cs file</strong></p><pre>builder.Services.AddRateLimiter(options =&gt;<br>{<br>    // Global limiter: API Key or User ID<br><br>    options.GlobalLimiter = PartitionedRateLimiter.Create&lt;HttpContext, string&gt;(context =&gt;<br>    {<br>        string partitionKey = context.Request.Headers[&quot;X-API-Key&quot;].FirstOrDefault()<br>            ?? context.User.FindFirst(&quot;sub&quot;)?.Value<br>            ?? context.Connection.RemoteIpAddress?.ToString()<br>            ?? &quot;anonymous&quot;;<br><br>        return RateLimitPartition.GetTokenBucketLimiter(partitionKey, _ =&gt; new TokenBucketRateLimiterOptions<br>        {<br>            TokenLimit = 10,<br>            TokensPerPeriod = 10,<br>            ReplenishmentPeriod = TimeSpan.FromSeconds(10),<br>            QueueLimit = 0,<br>            QueueProcessingOrder = QueueProcessingOrder.OldestFirst,<br>            AutoReplenishment = true<br>        });<br>    });<br><br>    //Endpoint - specific limiters<br><br>    // Login attempts<br>    options.AddFixedWindowLimiter(&quot;LoginLimiter&quot;, opts =&gt;<br>    {<br>        opts.PermitLimit = 3;                     <br>        opts.Window = TimeSpan.FromMinutes(1);  <br>        opts.QueueLimit = 0;<br>    });<br><br>    // Weather API calls<br>    options.AddSlidingWindowLimiter(&quot;WeatherLimiter&quot;, opts =&gt;<br>    {<br>        opts.PermitLimit = 5;                      // Allow 5 requests<br>        opts.Window = TimeSpan.FromMinutes(1);     // Within 1 minute<br>        opts.SegmentsPerWindow = 3;                // More granular tracking<br>        opts.QueueLimit = 0;<br>    });<br><br>    options.RejectionStatusCode = 429; // Too Many Requests<br><br>    // Custom rejection response<br>    options.OnRejected = async (context, token) =&gt;<br>    {<br>        context.HttpContext.Response.ContentType = &quot;application/json&quot;;<br>        var response = new<br>        {<br>            error = &quot;Rate limit exceeded&quot;,<br>            message = &quot;You have sent too many requests. Please try again later.&quot;<br>        };<br>        var json = JsonSerializer.Serialize(response);<br>        await context.HttpContext.Response.WriteAsync(json, token);<br>    };<br>});</pre><p><strong>Step 4: Update endpoints to use rate limiting</strong></p><pre>[HttpPost(&quot;login&quot;)]<br>[EnableRateLimiting(&quot;LoginLimiter&quot;)] <br>[AllowAnonymous]<br>public IActionResult Login([FromBody] LoginRequest request)<br>{<br>    var token = _authService.GenerateJwtToken(request.Username);<br>    return Ok(new { token });<br>}<br>[HttpGet]<br>[EnableRateLimiting(&quot;WeatherLimiter&quot;)] // Apply specific limiter<br>[Authorize]<br>public IEnumerable&lt;WeatherForecast&gt; Get()<br>{<br>    var weathers = _weatherService.GetForecast();<br>    return weathers.ToList();<br>}</pre><p><strong>Step 5: See Output</strong></p><p>Generate a JWT token to access the authorized endpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CVhOZj6kokowdEKUT97VFw.png" /></figure><p>For 5 request below output will come:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cQkspDEMnGgj7vLfI_8TMQ.png" /></figure><p>But after a limit is exceeded, the following rate-limiting error will display in response:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rU0WQ8TRwCwZVa-s76ywNA.png" /></figure><h3><strong>Implementing Redis-Based Distributed Rate Limiting in .NET 9 API</strong></h3><p>Let’s walk through the setup step-by-step.</p><p><strong>Step 1: Set up Redis</strong></p><p>First, configure Redis in the Program.cs:</p><pre>// ===== Add Redis distributed cache =====<br>builder.Services.AddStackExchangeRedisCache(options =&gt;<br>{<br>    options.Configuration = builder.Configuration[&quot;Redis:Connection&quot;] ?? &quot;localhost:6379&quot;;<br>    options.InstanceName = builder.Configuration[&quot;Redis:InstanceName&quot;];<br>});<br><br>// Register Redis connection multiplexer<br>var redisConnectionString = builder.Configuration[&quot;Redis:Connection&quot;];<br><br>builder.Services.AddSingleton&lt;IConnectionMultiplexer&gt;(sp =&gt;<br>    ConnectionMultiplexer.Connect(redisConnectionString)<br>);<br><br>// Register custom rate limiter service<br>builder.Services.AddScoped&lt;IRedisRateLimiter, RedisRateLimiter&gt;();</pre><pre>app.UseMiddleware&lt;RedisRateLimitMiddleware&gt;();</pre><p><strong>Step 2: Create Redis Rate Limiter Logic</strong></p><p>Create a Redis-based service that simulates fixed window rate limiting:</p><p>IRedisRateLimiter.cs</p><pre>namespace RateLimitingBlogDemo.Services<br>{<br>    public interface IRedisRateLimiter<br>    {<br>        Task&lt;bool&gt; IsRequestAllowedAsync(string key);<br>    }<br>}</pre><p>RedisRateLimiter.cs</p><pre>using StackExchange.Redis;<br><br>namespace RateLimitingBlogDemo.Services;<br><br>public class RedisRateLimiter(IConnectionMultiplexer redis) : IRedisRateLimiter<br>{<br>    private readonly IDatabase _db = redis.GetDatabase();<br><br>    public async Task&lt;bool&gt; IsRequestAllowedAsync(string key)<br>    {<br>        string redisKey = $&quot;rate_limit:{key}&quot;;<br>        var count = await _db.StringIncrementAsync(redisKey);<br><br>        if (count == 1)<br>        {<br>            int window_Seconds = (int)await _db.StringGetAsync(&quot;WINDOW_SECONDS&quot;);<br>            await _db.KeyExpireAsync(redisKey, TimeSpan.FromSeconds(window_Seconds));<br>        }<br>        int limit = (int)await _db.StringGetAsync(&quot;LIMIT&quot;);<br>        return count &lt;= limit;<br>    }<br>}</pre><p>Set Values in Redis CLI:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*qOCJ-q9Kl24ptsYDkbuYIQ.png" /></figure><p><strong>Step 3: Create Custom Middleware</strong></p><p>Intercept incoming requests and validate rate limits using Redis logic:</p><pre>using RateLimitingBlogDemo;<br>using RateLimitingBlogDemo.Services;<br>using System.Net;<br><br>namespace RedisRateLimitApi.Middleware;<br><br>public class RedisRateLimitMiddleware(RequestDelegate next)<br>{<br>    private readonly RequestDelegate _next = next;<br><br>    public async Task InvokeAsync(HttpContext context, IRedisRateLimiter rateLimiter)<br>    {<br>        var apiKey = context.Request.Headers[&quot;X-API-Key&quot;].FirstOrDefault();<br>        if (string.IsNullOrEmpty(apiKey))<br>        {<br>            context.Response.StatusCode = (int)HttpStatusCode.Unauthorized;<br>            await context.Response.WriteAsync(&quot;Missing API Key.&quot;);<br>            return;<br>        }<br><br>        if(context.GetEndpoint()?.Metadata.GetMetadata&lt;UseRedisRateLimiterAttribute&gt;() != null)<br>        {<br>            bool allowed = await rateLimiter.IsRequestAllowedAsync(apiKey);<br>            if (!allowed)<br>            {<br>                context.Response.StatusCode = (int)HttpStatusCode.TooManyRequests;<br>                await context.Response.WriteAsync(&quot;Rate limit exceeded.&quot;);<br>                return;<br>            }<br>        }<br><br>        await _next(context);<br>    }<br>}</pre><p><strong>Step 4: Create Custom Attribute</strong></p><p>To apply rate limiting selectively:</p><pre>namespace RateLimitingBlogDemo<br>{<br>    public class UseRedisRateLimiterAttribute : Attribute<br>    {<br>    }<br>}</pre><p><strong>Step 5: Use in Controller</strong></p><p>You can now apply Redis-based rate limiting on specific endpoints like this:</p><pre>[HttpGet(&quot;RedisRateLimiting&quot;)]<br>[UseRedisRateLimiter]<br>[Authorize]<br>public IEnumerable&lt;WeatherForecast&gt; Get()<br>{<br>    var weathers = _weatherService.GetForecast();<br>    return weathers.ToList();<br>}</pre><p>This ensures:</p><ul><li>Only endpoints with [UseRedisRateLimiter] invoke the limiter.</li><li>It uses an API Key from the header (X-API-Key) for partitioning.</li><li>“This will allow 3 requests per API key every 60 seconds.”</li></ul><p><strong>Step 6: See Output</strong></p><p>For 3 requests below output will come:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2tpxo27YwKZA4BBUVjeHlg.png" /></figure><p>If requests exceed the configured limit within the time window, Redis will return the following output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z_dkahsFMa00VexZ8xd9Jw.png" /></figure><h3>Conclusion</h3><p>In conclusion, implementing rate limiting in .NET APIs ensures stability, security, and fairness for all users. By combining the right algorithms, policies, and monitoring practices, you can protect your API from abuse while delivering a reliable and scalable experience.</p><p>For a hands-on reference, you can explore the Git repository <a href="https://github.com/dotnet-simformsolutions/rate-limiting-dotnet9-api">here</a>.</p><blockquote><strong><em>For more updates on the latest tools and technologies, follow the </em></strong><a href="https://medium.com/simform-engineering"><strong><em>Simform Engineering</em></strong></a><strong><em> blog.</em></strong></blockquote><blockquote><strong><em>Follow Us: </em></strong><a href="https://twitter.com/simform"><strong><em>Twitter</em></strong></a><strong><em> | </em></strong><a href="https://www.linkedin.com/company/simform/"><strong><em>LinkedIn</em></strong></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c029c158b476" width="1" height="1" alt=""><hr><p><a href="https://medium.com/simform-engineering/implementing-rate-limiting-in-net-9-apis-with-caching-and-middleware-c029c158b476">Implementing Rate Limiting in .NET 9 APIs with Caching and Middleware</a> was originally published in <a href="https://medium.com/simform-engineering">Simform Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering SQL Server Reporting Services (SSRS): Unleash the Power of Data Visualization]]></title>
            <link>https://medium.com/simform-engineering/mastering-sql-server-reporting-services-ssrs-unleash-the-power-of-data-visualization-6c04944ae9ab?source=rss-225d3d4ca6fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c04944ae9ab</guid>
            <category><![CDATA[sql-server-reporting]]></category>
            <category><![CDATA[ssrs-reports]]></category>
            <category><![CDATA[ssrs]]></category>
            <category><![CDATA[ssrs-report-viewer]]></category>
            <dc:creator><![CDATA[Gaurav Rathor]]></dc:creator>
            <pubDate>Fri, 10 Nov 2023 05:28:43 GMT</pubDate>
            <atom:updated>2023-11-10T05:28:43.800Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A comprehensive guide to harnessing SSRS for dynamic reports and insights.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Vemp0GwtpZFix3Se4YYiQ.png" /></figure><p>You can refer to my previous blog, “<a href="https://medium.com/simform-engineering/getting-started-with-ssrs-the-basics-unveiled-9264f3185a79"><strong>Getting Started with SSRS: The Basics Unveiled</strong></a>” to establish a foundational understanding of SSRS. This subsequent blog post will take your knowledge further and guide you through the process of creating an SSRS report from scratch.</p><h3><strong>Mastering the Art of Creating SSRS Reports: A Step-by-Step Guide</strong></h3><ol><li>Open Visual Studio and create a new Reporting Services Project.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*1leo_r6AzCAX2redTWymng.png" /></figure><p>2. To add a new report to your project, follow these steps:</p><ul><li>Right-click on the project, Select “Add, “ then “Click on “New Item.”</li><li>In the “Add New Item” window, choose “Report” from the template list.</li><li>Provide a name for your report.</li><li>Click on the “Add” button to create and add the new report to your project.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*7HSgZYA2wb3-wpycg3XQ5A.png" /></figure><p>3. The report designer will open, displaying the report layout and a toolbox with various report elements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*wsQVdVhZqoJWj_G6H7vaaw.png" /></figure><p>4. Configure the data source for your report. Right-click on the “Data Sources” folder in the “Report Data” pane, and select “Add New Data Source”.</p><p>Within the “Data Source Properties” window, provide the connection details for your data source, including the server name, authentication method, and database name. To verify that the connection works correctly, click the “Test Connection” button. Once you confirm the successful connection, click “OK” to save the data source settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*KlOwvWLeCdp21FTqYGHYzg.png" /></figure><p>5. Create a dataset by right-clicking on the “Datasets” folder in the “Report Data” pane and selecting “Add Dataset.“</p><p>Within the “Dataset Properties” window, you should define a name for your dataset, select the preconfigured data source, and compose the SQL query or specify the stored procedure responsible for retrieving the necessary data for your report. Finally, click on “OK” to save the dataset configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*gH1IIDqYeBs3H2ZoidBeVQ.png" /></figure><p>6. Construct the report layout by simply dragging and dropping report elements from the toolbox onto the report canvas. For instance, you can incorporate a table for tabular data presentation, a chart to visualize data trends, or an image to include pictures within the report.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*EyJ615TIOe7g9knKhbQ32Q.png" /></figure><p>7. Bind the report elements to the dataset fields by selecting the element, accessing its properties, and specifying the corresponding dataset field in the appropriate property. For instance, you can set the “Value” property of a textbox to a dataset field.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*O1MqtcPNLyr1HRwdNO_ZQQ.png" /></figure><p>To get a preview of your report, follow these steps:</p><ul><li>Click on the “Preview” tab within your report design environment.</li><li>If your report includes parameters, you can enter the desired values for these parameters.</li><li>Once you’ve set any necessary parameters, the report will be rendered based on the selected dataset and parameter values.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*_lUlQ6WWMPjpWoszjhUNug.png" /></figure><h3><strong>Table vs. Matrix: Choosing the Right Structure for Your SSRS Report</strong></h3><h3><strong>Table</strong></h3><p>Use a table when:</p><ul><li>Your data consists of a fixed number of columns, with each column representing a specific attribute or field.</li><li>You want to exhibit data in a straightforward, row-by-row layout.</li><li>The total number of rows is either known or can be determined in advance.</li><li>Tables are well-suited for displaying data that adheres to a consistent structure, such as a list of customers, products, or orders. Each row in the table signifies a separate record, while each column corresponds to a particular attribute or field within that record.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*4FLx8zPNXkFImt2o01HHlA.png" /><figcaption>Table Example</figcaption></figure><h3><strong>Matrix</strong></h3><p>Use a matrix when:</p><ul><li>Your data exhibits dynamic columns that require grouping or pivoting.</li><li>You aim to present summarized data in a cross-tabular format.</li><li>The number of rows and columns can fluctuate depending on the data.</li><li>Matrices prove invaluable when you need to showcase data in a cross-tabular style, where both rows and columns can dynamically adjust based on the data. Matrices provide the flexibility to group and summarize data across various dimensions like time periods, categories, or regions. They are particularly handy for displaying data that involves calculated totals and subtotals.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*Vqothvo1lVJSKY5Wt1xlEQ.png" /><figcaption>Matrix Example</figcaption></figure><p><strong>Enhancing Your SSRS Reports with Multiple Datasets: A Comprehensive Guide</strong></p><p>Create Multiple DataSet :</p><ol><li>EmployeeNameDataset</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*iRrcMJCgCNISQzyGe-sAOQ.png" /></figure><p>2. EmployeeSalaryDataset</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*j4LzQLn-_ByeydyO-relsw.png" /></figure><p>To design a report with a table and bind data to its columns, follow these steps:</p><ol><li><strong>Add a Table</strong></li></ol><p>· Drag and drop a table control onto the report design surface. This table will be the main container for displaying your data.</p><p><strong>2.</strong> <strong>Add Table Columns</strong></p><p>· Inside the table, add columns to display the necessary information from your datasets. For instance, you can create columns for FirstName, Last Name, and Salary.</p><p><strong>3.</strong> <strong>Bind Data to Columns</strong></p><ul><li>Bind the table columns to the corresponding fields from each dataset. To do this, select a cell within a column and access its properties. In the properties window, locate the expression or value property for the cell.</li><li>Set the expression for each cell to pull the relevant data from the appropriate dataset. This involves specifying the dataset field or expression that should be displayed in that cell.</li></ul><p>By following these steps, you’ll create a report with a table that displays data from multiple datasets in the desired columns, with each cell bound to the relevant dataset field or expression.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*CPiKzN5Bl0HDf1s2KBVA9g.png" /></figure><p>In the above image, it appears that the “FirstName” and “LastName” columns are bound directly to the “EmployeeNameDataset,” while the “Salary” column is bound to the “EmployeeSalaryDataset” using an expression. This approach allows you to combine data from multiple datasets in a single report, enhancing its flexibility and data presentation capabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*Esy7XkPjhuGCbrdaQLy6fg.png" /></figure><h3>OUTPUT:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*aM82V6tFNtro5x9iBnLtXg.png" /></figure><h3>Conclusion</h3><p>We hope this blog has helped you understand the core principles of SSRS for creating dynamic, data-driven reports. We’ve covered essential concepts and practical techniques. Now you’re well-prepared to not only generate static reports but to create dynamic, interactive reports that adapt to changing data and user interactions.</p><p>Remember that the power of SSRS lies in its ability to enable data-driven decision-making. Whether you’re a data professional, a business analyst, or an IT specialist, the skills and insights gained here will help you to use SSRS to its full potential.</p><blockquote><strong>For more updates on the latest development trends, follow the </strong><a href="https://medium.com/simform-engineering"><strong>Simform Engineering</strong></a><strong> blog.</strong></blockquote><blockquote><strong>Follow Us: </strong><a href="https://twitter.com/simform"><strong>Twitter</strong></a><strong> | </strong><a href="https://www.linkedin.com/company/simform/"><strong>LinkedIn</strong></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c04944ae9ab" width="1" height="1" alt=""><hr><p><a href="https://medium.com/simform-engineering/mastering-sql-server-reporting-services-ssrs-unleash-the-power-of-data-visualization-6c04944ae9ab">Mastering SQL Server Reporting Services (SSRS): Unleash the Power of Data Visualization</a> was originally published in <a href="https://medium.com/simform-engineering">Simform Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with SSRS: The Basics Unveiled]]></title>
            <link>https://medium.com/simform-engineering/getting-started-with-ssrs-the-basics-unveiled-9264f3185a79?source=rss-225d3d4ca6fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/9264f3185a79</guid>
            <category><![CDATA[ssrs]]></category>
            <category><![CDATA[sql-server-reporting]]></category>
            <category><![CDATA[ssrs-reports]]></category>
            <category><![CDATA[dynamic-reports]]></category>
            <dc:creator><![CDATA[Gaurav Rathor]]></dc:creator>
            <pubDate>Tue, 17 Oct 2023 11:03:33 GMT</pubDate>
            <atom:updated>2023-10-17T11:03:33.438Z</atom:updated>
            <content:encoded><![CDATA[<p><em>SSRS made simple for data enthusiasts.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kbmh1XUOnqgfFKVlMgZ8Bw.png" /></figure><p>SSRS stands for SQL Server Reporting Services. An organization’s users can generate, manage, and receive reports using this server-based reporting platform.</p><p>SSRS is a part of the Microsoft Business Intelligence (BI) stack, which includes other tools like SQL Server Analysis Services (SSAS) and SQL Server Integration Services (SSIS).</p><p>You can create various types of reports, such as tables, matrices, charts, and maps, by connecting to various data sources, including SQL Server, Oracle, Excel, and other data sources. These reports can be deployed to a centralized server and accessed by users through a web browser or integrated into other applications.</p><p>SSRS offers a diverse array of capabilities, spanning interactive reports, data visualization, parameterized reporting, and security alternatives, among others. Enterprises widely embrace its adoption to promote data-centric decision-making and enable seamless information exchange with their employees, clients, and other stakeholders.</p><h3><strong>Top SSRS features</strong></h3><p>SQL Server Reporting Services (SSRS) provides a wide range of features that enable users to create, manage, and deliver reports. Here are some of the key features of SSRS:</p><ul><li><strong>Report Design:</strong> SSRS provides a data designer that allows users to drag and drop to create a variety of reports (from tables and matrices to graphs and maps).</li><li><strong>Data Sources:</strong> It allows you to connect to multiple data sources, including SQL Server, Oracle, Excel, and others, to store data reports.</li><li><strong>Parameterized Reports:</strong> SSRS supports the creation of parametrized reports, providing users with the ability to manipulate data filtration, sorting, and report output.</li><li><strong>Interactive Reports:</strong> It provides an interactive database that allows users to access and explore data in greater detail.</li><li><strong>Data Visualization:</strong> SSRS offers a variety of data visualization options, including charts, gauges, maps, and sparklines, to help users better understand and communicate data.</li><li><strong>Security:</strong> It offers robust security options, including role-based security, authentication, and encryption, to protect sensitive data and control report access.</li><li><strong>Subscriptions:</strong> SSRS allows users to schedule and automate report delivery through email or file shares.</li><li><strong>Integration:</strong> It integrates with other Microsoft BI tools, including Power BI, Excel, and SharePoint, to provide a complete reporting and analysis solution.</li></ul><h3><strong>Navigating the SSRS development life cycle</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*-vAIoiMI0G4uj8KpBqIWbg.png" /></figure><p>The development cycle for SQL Server Reporting Services (SSRS) can be broken down into the following stages:</p><ol><li><strong>Report Design:</strong> Create report layouts using the SSRS Report Designer tool, which is usually integrated with Microsoft Visual Studio. Identify data sources, query data, and create visual content such as tables, charts, and graphs.</li><li><strong>Data Source Configuration:</strong> Ensure a seamless connection between the report and pertinent data sources, including Oracle databases, SQL Server databases, or other relevant data systems, to enable the retrieval of information for the reports.</li><li><strong>Dataset Development:</strong> Create and configure datasets within the report. Define the queries or stored procedures that retrieve data from the data source. Apply any necessary filters, sorting, or grouping to shape the dataset to meet the report requirements.</li><li><strong>Report Development:</strong> Execute the report design process by linking data elements to their respective dataset fields, set up report parameters to grant users customization options during runtime, and enhance the report’s visual appeal and functionality through the application of formatting, styles, and expressions.</li><li><strong>Testing and Debugging:</strong> Perform a thorough test by running the report to validate data accuracy, check process functionality, and ensure correct interactions and feature effects. Promptly troubleshoot and resolve any issues or bugs that may arise during testing.</li><li><strong>Deployment:</strong> Publish report to SSRS server or Web Portal for user access. Set appropriate security permissions to control who can view or edit reports.</li><li><strong>Report Usage:</strong> Users can now run the report using the available parameters and view the results. They can export the report to various formats (PDF, Excel, Word, etc.) or schedule it for automatic delivery.</li></ol><h3><strong>Enhancing SSRS: Exploring useful extensions for your reporting needs</strong></h3><ol><li><strong>SQL Server Integration Services Projects</strong></li></ol><ul><li>It is an additional tool integrated with Microsoft Visual Studio, offering a dedicated development environment for creating, deploying, and overseeing SSIS packages. SSIS, an integral component of SQL Server, facilitates data integration and transformation tasks.</li></ul><p>2. <strong>Microsoft Reporting Services Projects</strong></p><ul><li>It is integrated with Microsoft Visual Studio and empowers users to develop and deploy reports via SQL Server Reporting Services (SSRS). It offers a specialized workspace within Visual Studio, allowing for the creation, design, and publication of reports to an SSRS server.</li></ul><h3><strong>Essential SSRS terminology every developer should know</strong></h3><ol><li><strong>RDL</strong></li></ol><ul><li>The abbreviation RDL stands for Report Definition Language and represents the file format employed in SQL Server Reporting Services (SSRS) for defining and storing report definitions. RDL files encompass a report’s structure, layout, and attributes, encompassing elements such as data sources, datasets, report parameters, and graphical components.</li><li>When you design a report using tools like Report Builder or Microsoft Visual Studio with the SQL Server Reporting Services Projects extension, you create and save the report definition in the RDL format. The RDL file contains XML markup that represents the report structure and configuration.</li></ul><p><strong>2. DataSet</strong></p><ul><li>A dataset is a component that defines the query which is used to retrieve data for a report. A dataset specifies the fields, columns, and rows used to build the report.</li><li>In the SSRS report design, it’s possible to establish one or multiple datasets to fetch data from one or more data sources. These datasets form the core data sources for filling the report’s tables, charts, and other report elements with real data.</li></ul><p><strong>3. Data source</strong></p><ul><li>A data source is a configuration that defines the connection information to a specific data repository from which the report retrieves data. It specifies the server, database, authentication method, and other details required to establish a connection to the database.</li></ul><h3><strong>SSRS reporting power: Export your reports in multiple formats</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*J2EybJn3e87F6c6RVfwkGg.png" /></figure><p><strong>SSRS reports can be of the following types:</strong></p><ul><li>Basic reports</li><li>Parameterized reports</li><li>Linked reports</li><li>Drilldown reports</li><li>Subreports</li><li>Cached reports</li><li>Snapshot reports</li></ul><ol><li><strong>Basic reports:</strong> These are simple and straightforward report designs that contain essential elements such as data sources, datasets, tables, and basic formatting.</li><li><strong>Parameterized reports:</strong> Parameterized reports in SQL Server Reporting Services (SSRS) are reports designed to offer users the ability to dynamically tailor the displayed data by specifying parameters or inputs. These reports empower users to engage with the report interface, either by selecting values from predefined lists or by manually entering input values, thus allowing for customized and interactive reporting experiences.</li><li><strong>Linked reports:</strong> A linked report is accessible by clicking on a particular data point or hyperlink within another report. Linked reports serve as a mechanism for transitioning from summarized or high-level information to more detailed or focused data. This allows users to drill down or navigate to related information for a deeper understanding or analysis.</li><li><strong>Drill down reports:</strong> Drill down reports in SSRS allow users to show or hide the column data by providing plus and minus symbols on a text box.</li><li><strong>Subreports: </strong>A subreport is a report that is integrated or included within another primary or main report. Subreports offer a means of combining separate reports into a larger report, facilitating modular report design and enhancing reusability.</li><li><strong>Cached reports:</strong> A cached report allows you to create a copy of the processed reports. They are used to enhance performance by reducing the number of processing requests and time to retrieve large reports.</li><li><strong>Snapshot reports:</strong> A snapshot report is a pre-rendered version of a report that is generated and saved at a specific time. When a snapshot report is created, it captures the report data, layout, and formatting as a single, frozen snapshot. This means that the report is no longer dependent on real-time data and does not necessitate reprocessing each time it is viewed.</li></ol><h3><strong>Conclusion</strong></h3><p>This blog has provided a solid foundation for getting started with SQL Server Reporting Services (SSRS). We’ve covered the essential concepts, steps, and best practices to help you create and deploy your first reports. By following the steps outlined in this blog, you should now have the confidence to create basic SSRS reports, connect to data sources, and customize your reports to meet your specific needs.</p><p>However, the world of SSRS is vast, and there is much more to explore and master. If you want to take your SSRS skills to the next level, I recommend checking out the next blog in this series, “Mastering SQL Server Reporting Services (SSRS).” It will help you harness the full power of SSRS for your reporting needs. Good luck, and happy reporting!</p><blockquote><strong>Follow </strong><a href="https://medium.com/simform-engineering"><strong>Simform Engineering</strong></a><strong> to keep up with the latest trends in the development ecosystem.</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9264f3185a79" width="1" height="1" alt=""><hr><p><a href="https://medium.com/simform-engineering/getting-started-with-ssrs-the-basics-unveiled-9264f3185a79">Getting Started with SSRS: The Basics Unveiled</a> was originally published in <a href="https://medium.com/simform-engineering">Simform Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>