Skip to content

Performance

Problem Statement

Discuss ways that you can improve an internet-based content system management system’s performance in terms of latency, security, data availability, and migration. Your response should list at least three improvements for each of the performance aspects listed

Solution

  • When it comes to the performance of the system, many players are responsible for it, including network engineers, DBAs, and programmers (UoPeople, 2022).
  • The performance of online systems depends on the network bandwidth, operating server health, database optimization, and application code.
  • Each of these aspects affects the performance of the system in different ways. For example, network bandwidth affects latency, operating server health affects availability, database optimization affects latency, and application code affects security.
  • This essay will discuss some suggestions to improve the performance of the system in terms of latency, security, data availability, and migration.

Latency

  • Latency means the time it takes for a request to be processed and returned to the user. The latency of a system is affected by almost every aspect of the system; however, the most important factors are the network bandwidth and the database optimization (including the parts of the application code that interact with the database).
  • The network bandwidth is important; and while you can not do anything about the user’s network, you can do the following:
    • Minimize the size of data sent over the network. Humans usually do not consume large data at once, if you have control over the client (e.g. front-end), you can utilize modern frameworks to only request the data that is needed.
    • Compress data before sending it over the network. This is especially important for images and other media files. Then the client can decompress it once loaded.
    • If the system faces high traffic, think of putting multiple servers behind a load balancer. This way, the load is distributed among the servers, and the load on each server is reduced.
    • If a piece of data is expensive to calculate, and requested frequently, putting the computed data in a cache can reduce the load on the server, since the next requests will be served the computed data from the cache.
    • CDN (content delivery network) can reduce the latency of the system by caching the data on the edge of the network. This way, the data is closer to the user, and the latency is reduced.
  • Database optimizations are also an important factor, here are some things you can do about it:
    • Putting the database (physically) near the server can reduce the latency of the database queries.
    • For high traffic, a cluster of database servers can be utilized, with a load balancer in front of them.
    • Do queries in parallel, if possible. If the system has multiple queries for a request, you can do them in parallel, and then combine the results.

Security

  • Security is a very important aspect of the system. The security of the system is affected by the application code, the network, and the database.
  • Here are some tips for maximizing the security of a web system:
    • Keep the application code up to date. This is important to keep the system secure from known vulnerabilities.
    • Never trust the user input. Always sanitize the user input before using it. This is important to prevent SQL injection attacks.
    • Use encryption for sending data through the network.

Data Availability

  • Data availability is the ability of the system to serve the data to the user. This is affected by the operating server’s health, the network, and the database.
  • Here are some tips to ensure the availability of the system:
    • The practices that are used to reduce latency usually help with availability as well. For example, putting multiple servers behind a load balancer or using a CDN.
    • Fatal errors on application code (e.g. uncaught exceptions) should be handled gracefully. This way, only the request that caused the error is affected, and the rest of the system is not affected (preventing system failure).
    • Running multiple database servers in a cluster can help with availability. If one of the servers fails, the other servers can take over the requests.

Migration

  • Migration is the process of moving the system from one place to another. This is affected by the application code, the network, and the database.
  • Here are some tips to ensure a smooth migration:
    • Start migrating your new system before you stop the old system. This way, you can test the new system before you stop the old system.
    • After the migration is done; you can change the DNS records to point to the new system. This way, the users will be directed to the new system.
    • DNS records take time to propagate. It is important to keep the old system running for a while after the migration, to ensure that all the users are directed to the new system.
  • If migration is done correctly, the users should not notice any difference in the system.

References