Product Engineering Archives - Document360 https://document360.com/blog/category/product-engineering/ The knowledge base that scales with your product. Wed, 13 Dec 2023 09:09:13 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.2 https://document360.com/wp-content/uploads/2018/06/favicon-150x150.png Product Engineering Archives - Document360 https://document360.com/blog/category/product-engineering/ 32 32 Revolutionizing Load Testing with Azure Load Test https://document360.com/blog/document360-azure-load-test/ Mon, 07 Aug 2023 10:34:36 +0000 https://document360.com/?p=8684 As a SaaS product that operates in a multi-tenant architecture, it serves multiple ...

The post Revolutionizing Load Testing with Azure Load Test appeared first on Document360.

]]>
As a SaaS product that operates in a multi-tenant architecture, it serves multiple users simultaneously, each with varying demands and usage patterns. Conducting load tests allows us to simulate realistic scenarios and gauge the product’s performance under different load conditions. By subjecting the SaaS product to heavy user loads, we can identify potential bottlenecks, assess its ability to handle concurrent requests, and determine if the infrastructure and resources can scale efficiently. In this blog, we delve into the details of our recent runs in Azure load testing and highlight the effectiveness of this approach.

Previously, our load testing process heavily relied on manual intervention using JMeter, where we manually modified the article and Token ID in the JMeter suite and exported results in CSV format which were then transferred to Excel sheets for analysis during each release. Despite providing us with basic insights like average response time and API throughput, this approach lacked the efficiency and scalability necessary for conducting comprehensive load testing. Furthermore, the time-consuming process of comparing post and pre-deployment results in Excel graphs became a daunting task and hindered report maintenance.

Performance Optimization – Parameterized Azure Load Testing

To overcome these limitations, we embraced the Azure Load Test for our Document360 product, where we harnessed the capabilities of Azure virtual machine infrastructure. By configuring JMeter within a virtual user environment, we unlocked a world of possibilities for load testing. Parameters like the number of threads, ramp-up period, and loop count ensured accurate simulation of user behavior, while response time metrics and error thresholds brought crucial performance insights to the forefront.

With Azure Load Test, we have the flexibility to configure our load testing setup based on specific modules. This enables us to perform testing on various load testing patterns (such as Stress, Spike, ramp up, Soak, and more) to meet specific application requirements. Whether we need to simulate high loads, stress test critical components, or analyze performance under different scenarios, Azure Load Test’s module-based configuration empowers us to tackle diverse testing challenges with ease.

Scalability and Cost Efficiency

Azure’s virtual machines proved to be the perfect ally for load testing. Their scalability allowed us to adjust resources on the fly, without the need for hardware changes. With pay-as-you-go pricing, we only paid for the duration of the load testing, eliminating the need for dedicated hardware investments. Resource isolation ensured reliable results, while environment replication guaranteed consistency across different setups. Rapid provisioning, simplified setup, and test repeatability streamlined the testing process, saving valuable time and effort. Centralized management tools provided easy control, monitoring, and troubleshooting, simplifying the management of our load tests.

Schedule a demo with one of our experts to take a deeper dive into Document360

Book A Demo
Document360

Real-Time Insights and Optimization

With Azure Load Test’s client-side and server-side dashboards, we unlocked real-time monitoring of API performance. Each API’s performance could be tracked and analyzed, allowing us to make data-driven decisions. Comparing test results became effortless, enabling us to identify deviations and improvements across different test runs. By passing parameters like bearer tokens within Azure itself, we simulated real-world scenarios accurately, ensuring our load tests reflected actual usage patterns. The seamless integration with JMeter allowed us to upload comprehensive JMeter suites, empowering us to analyze performance metrics and optimize our application’s performance effectively.

Benchmarking and Comparison

Response time metrics allow for benchmarking and performance comparison across different releases, environments, or competing applications. By establishing baseline response time metrics, we can track the application’s performance over time, assess the impact of changes or optimizations, and make data-driven decisions for future improvements.

Re-Running Tests for Continuous Improvement

But the power of Azure Load Test didn’t stop there. When changes were made in the same pre-release deployment, we could easily re-run the same test, validating the effectiveness of our fixes and improvements. This iterative testing approach paved the way for continuous improvement, ensuring our application met performance expectations.

Insights and Recommendations from Azure

Azure Load Test took our performance testing to the next level by providing insightful recommendations for improving our application’s resiliency. No more digging through logs or struggling to identify bottlenecks. Azure itself suggested solutions, allowing us to optimize our application effortlessly. The resiliency report provided valuable insights into the application’s ability to handle unexpected failures and recover gracefully.

With Azure Load Test’s result dashboard, effortlessly share comprehensive test results via a convenient link. Stakeholders can access and review detailed monitoring information with ease. Furthermore, you can download the test result logs and input files from each test run for further analysis and investigation. Here, we share a sample report of the Constant Load Pattern to provide an overview of the recent release. Where the response time and throughput for the Virtual User (VUser) configuration remained the same at 600ms with no deviation. This suggests that the release did not introduce any significant performance issues.

Azure Load Test from Manual JMeter

Conclusion

In this blog, we have demonstrated how we have improved our load testing in Document360 by leveraging Azure load testing. We have also added more scalability, cost efficiency, benchmarking capabilities, and real-time insights into our application load testing. 

An intuitive knowledge base software to easily add your content and integrate it with any application. Give Document360 a try!

GET STARTED
Document360

The post Revolutionizing Load Testing with Azure Load Test appeared first on Document360.

]]>
How Document360 Leverages Azure Virtual Network for Isolation and Security? https://document360.com/blog/azure-virtual-network-for-isolation-and-security/ Wed, 21 Jun 2023 07:28:14 +0000 https://document360.com/?p=8317 A virtual network is a logical representation of an isolated network in Microsoft ...

The post How Document360 Leverages Azure Virtual Network for Isolation and Security? appeared first on Document360.

]]>
A virtual network is a logical representation of an isolated network in Microsoft Azure. VNet enables services in the Azure network to communicate securely with each other. It’s similar to a physical network which connects computers using hardware, whereas Azure virtual networking connects services across many locations and comes with inbuilt features like scalability, security, and high availability.

By default, all resources in Virtual Network can communicate outbound to the internet. However, we can use public IP addresses or a public load balancer for an inbound internet connection.

Components of Virtual Networking

Address Space:

Address Space is required to define the custom private address space (RFC 1918) range while creating a VNet resource. Microsoft Azure recommends below address spaces for private IP address communication:

  • 10.0.0.0 – 10.255.255.255
  • 172.16.0.0 – 172.31.255.255
  • 192.168.0.0 – 192.168.255.255

Note: Make sure VNet address spaces cannot overlap each other.

Subnet:

Subnet plays a vital role in segmenting the virtual network into multiple networks to isolate the traffic and provides better security. A subnet can be defined as a range of IP addresses within the virtual network address space range. An IP defined in a subnet can communicate with other IP addresses configured within the VNet by default. However, we can customize this behavior using the Network Security Group.

NSG:

Network Security Groups (NSGs) are used in Azure Virtual Network (VNet) to provide an additional layer of network security by filtering inbound and outbound traffic based on specific protocols, ports, or IP addresses. NSGs help to segment the network traffic, monitor network activity, and customize security rules to meet business needs.

Interested in Document360 Knowledge base? Schedule a demo with one of our experts

Book A Demo
Document360

How does “Route All” impacts VNet?

In Azure Virtual Network (VNet), “Route all ” is a network routing option that directs all traffic in the VNet to the next hop. This means that any traffic originating from resources within the VNet will be sent to the specified next hop, which can be any configured Azure resources (Ex: Azure VM, Load Balancer, Application Gateway, or VPN Gateway).

VNet Configuration

The impact of using “Route all” in Azure VNet can be significant and should be carefully considered. below are some of the key considerations while designing the networking with route all options:

Network Performance:

“Route all” can affect network performance, as all traffic in the VNet is directed to the specified next hop. If the next hop is not properly sized or configured, it can become a bottleneck and cause performance issues.

Network Security:

It is possible to have an impact on network security. Since all traffic is directed to the next hop, it can be intercepted or redirected if the next hop is compromised. It’s important to ensure that the next hop is properly secured and monitored.

Routing Complexity:

It can make routing more complex, primarily if multiple next-hops are used for different types of traffic. This can make it harder to troubleshoot the network issues and can lead to possible routing conflicts if not properly configured.

Cost:

It can also have cost implications, as the next hop may be an Azure resource that incurs additional charges. It’s important to consider the cost of using “Route all” and to ensure that it is properly sized and configured to minimize costs.

How it helps Document360?

Isolation:

Document360 uses a dedicated Virtual Network for the services hosted in the cloud for better isolation and sophisticated network topologies.

Security:

VNet provides a secure environment and network for all our applications. Moreover, it provides reliable and excellent network connectivity. It provides an extra layer of security for our resources, as they are not directly exposed to potential threats.

Customization:

It gives us full control over network configuration to monitor the incoming/outgoing traffic and create the rules to allow or deny the traffic.

Virtual Network

Scalability:

VNet is highly scalable; it allows us to easily add or remove resources based on business demands. We can also use Azure VNet peering to connect multiple VNets which enables us to scale out the network architecture without sacrificing performance.

SNAT Port Exhaustion

Azure Web Apps or virtual machines may need to have outbound connectivity to the internet for certain use cases. This process uses source network address translation (SNAT) to translate the web application’s private addresses to the load balancer’s public IP address. Generally, Azure App Service web application needs to connect with different external applications/endpoints, such as Redis, Search Server endpoints SQL/NoSQL Databases, and call another RESTful service.

Every instance of Azure App service is initially pre-allocated with 128 SNAT ports. The SNAT port limit affects when every connection to the same destination IP and destination port uses a SNAT port.

SNAT port exhaustion occurs when the server runs out of available ports to use for translation.

SNAT port

Cost:

Azure VNet is a paid service, so it’s important to consider the cost implications of your network design. You can use Azure Cost Management and Billing to monitor your Azure usage and optimize your costs.

Conclusion

Azure Virtual Network is a powerful service that provides a secure and scalable way to connect your resources in the cloud. By carefully designing your network topology and considering factors such as IP addressing and security, you can create a customized network environment that meets your business needs. With Azure VNet, you can take full advantage of the cloud’s flexibility and agility while maintaining the security and control that your business requires.

An intuitive knowledge base software to easily add your content and integrate it with any application. Give Document360 a try!

GET STARTED
Document360

The post How Document360 Leverages Azure Virtual Network for Isolation and Security? appeared first on Document360.

]]>
Introducing d360, a command line interface to streamline API documentation https://document360.com/blog/streamline-api-documentation/ Tue, 09 May 2023 07:16:24 +0000 https://document360.com/?p=8060 As a software development team, you might have spent endless hours building and ...

The post Introducing d360, a command line interface to streamline API documentation appeared first on Document360.

]]>
As a software development team, you might have spent endless hours building and refining your API, ensuring it meets the needs of your users and integrates efficiently with other systems. However, you’ve noticed that documenting your API effectively can be a time-consuming and error-prone task, specifically frequent. You might have also realized that having accurate and up-to-date API documentation is critical to your user’s success and satisfaction with your product.

To address these challenges, we’ve recently launched a new feature that lets users import their API definitions directly into your platform, giving them clear prominence in the API’s endpoints, parameters, and response codes. This feature has already generated positive user feedback, but you want to take it a step further and make it even more robust and handy to use.

To that end, we’ve introduced a command-line tool called d360, which allows developers to import or resync their API definitions directly from their CI/CD pipelines. This tool automates the documentation process, ensuring that the documentation is always up-to-date and in sync with the API code. We’ve also taken care to ensure that the tool is flexible, customizable, and integrates seamlessly with other development tools and services.

In this blog, we’ll take a closer look at the challenges of documenting APIs, the benefits of using command-line tools like d360, and how to use d360 in your own development workflow. We’ll provide examples of the commands available in the tool and explain how to set up the tool in your CI/CD pipeline. By the end of this blog, you’ll have a clear understanding of how d360 can help you streamline your documentation process and ensure that your users have the information they need to successfully use your API.

Why do we need command line tools?

As part of the developer’s toolkit, command line tools provide a fast, flexible, and powerful way to handle commands in all kinds of environments. Here are a few reasons why command line tools are useful:

    • Automation: h2Command line tools allow developers to automate repetitive tasks or workflows, such as building and deploying code, running tests, and managing files and directories. By using command line tools, developers can write scripts that can perform these tasks automatically, saving them time and reducing the risk of errors.
    • Flexibility: Command line tools provide a more flexible and customizable way to interact with the operating system compared to graphical user interfaces (GUIs). Developers can use a wide range of options, flags, and parameters to customize the behavior of command line tools to their specific needs.
    • Remote access: Command line tools are often used for remote access to servers or cloud-based resources, allowing developers to manage and deploy code from anywhere with an internet connection.
    • Speed: Command line tools are often faster and more efficient than GUIs because they don’t require graphical rendering and can perform tasks in the background. This can be especially important for developers working with large codebases or complex systems.
    • Integration: Command line tools can easily be integrated with other tools and services, such as version control systems, testing frameworks, and deployment pipelines. This makes it easier for developers to create automated workflows and streamline their development process.

Our d360 CLI tool is designed to meet all the above-mentioned requirements, ensuring that your resync process can be automated in a fast and efficient manner.

d360 – Maintenance

Currently, we have published our tool in NPM (short for Node Package Manager) is a package manager for the JavaScript programming language. It is used to manage and share packages of code that are written in JavaScript/Typescript and can be used in various applications.

For better versioning of this package, we have followed a process called Semantic Release. It involves analyzing the changes made in a project’s source code repository, determining the type of release based on the nature of those changes, and automatically updating the project’s version number and creating a release in the appropriate format (e.g., a Git tag or a release on GitHub).

How to use d360 in CI/CD?

Basically, let’s say you have your OAS spec file in your repository, you already might have a CI/CD pipeline that takes care of your building and deployment of your APIs. During this build process, you just need to add two commands which take care of resyncing your API definition to Document360.

npm install d360 -g

d360 apidocs:resync –userId=<Enter User ID>

                    --apiReferenceId <Enter API Reference Id>

                    --apiKey <Enter API Key>

                    --path <File path or URL>

If you add the above two commands, the resync will be done in a smooth manner.

Using this tool exclusively in your CI/CD flow is not mandatory. As an NPM package, you have the option to install it directly onto your local machine, allowing you to execute both commands seamlessly.

Also Read: 6 Best API Documentation Tools for 2023

Commands available in d360

Currently, there are two commands available in our tool,

    • apidocs – Import your API Definition to Document360
    • apidocs:resync – Resync your API Definition to Document360

apidocs

By utilizing the ‘apidocs’ command, you will have the ability to generate API documentation directly from your API Definition file.

d360 apidocs 
             --apiKey=c92e71ab-ebdf-4007-89ed-5d47493052cd

             --userId=3340e95e-2b68-4a3f-a8c9-124bcaec9972

             --versionId=d486783f-b833-446e-aa71-615ac51392c3

             --path=https://petstore.swagger.io/v2/swagger.json
Options  Description 
apiKey string Project API Key
userId string User Id that’s used to generate API Docs
versionId string Project Version Id
apihubUrl  string APIHUB Base URL. The default value for this parameter is ‘https://apihub.document360.io’
path string File path of your respective API Reference
force boolean Force imports your API Reference. It will import even if there are errors or warnings present within your specification files.
publish boolean Publish articles after import. By default, all the articles will be in draft state after import

apidocs:resync

With the ‘apidocs:resync’ command, you are able to update or resynchronize your API Definition.

d360 apidocs:resync 

                  --apiKey=c92e71ab-ebdf-4007-89ed-5d47493052cd

                  --userId=3340e95e-2b68-4a3f-a8c9-124bcaec9972

                  --apiReferenceId=d486783f-b833-446e-aa71-615ac51392c3

                  --path=https://petstore.swagger.io/v2/swagger.json
Options  Description 
apiKey string Project API Key
userId string User Id that’s used to generate API Reference 
apiReferenceIdstring  API Reference Id to resync
apihubUrl string APIHUB Base URL. The default value for this parameter is ‘https://apihub.document360.io’
path string File path of your respective API Definitions
force boolean Force imports your API Reference. It will import even your spec files has errors and warnings
publish boolean Publish articles after import. By default, all the articles will be in draft state after import

Conclusion

To sum up, I had a tremendous experience fostering this command line tool, which offers a compelling and effective method for importing and resyncing API definitions to Document360. Our team will constantly enhance this tool’s experience and stability.

An intuitive knowledge base software to easily add your content and integrate it with any application. Give Document360 a try!

GET STARTED
Document360

The post Introducing d360, a command line interface to streamline API documentation appeared first on Document360.

]]>
Test Automation Framework: How we built it for Document360 https://document360.com/blog/document360-test-automation-framework/ Thu, 13 Apr 2023 05:34:19 +0000 https://document360.com/?p=7910 Nowadays, product-based companies are expected to deliver a product in a short time. ...

The post Test Automation Framework: How we built it for Document360 appeared first on Document360.

]]>
Nowadays, product-based companies are expected to deliver a product in a short time. The testing team goes through a very thorough and strict QA process to ensure top-notch performance & quality of the final product.

In Document360, we have a portal to create content and a knowledge base site to view published content. Our team performs various types of testing like functional, performance, and security to ensure product quality. There is no debate that if companies want to improve their overall efficiency, the next step is the adoption of Automation in testing.

To ensure maximum efficiency, we decided to automate our functional testing, via various testing tools and frameworks. We compared various solutions before picking the right one based on our requirements.

Document360’s test automation framework

We developed a hybrid test framework using Selenium C# with NUnit. This improved the testing efficiency and helped to optimize total testing time. The main advantage of a Hybrid framework is that it allows us to combine any two or three other frameworks’ approaches to overcome the limitations of one framework. This brings more flexibility while doing end-to-end automation testing.

Below is the Architecture Diagram of our Document360 test automation framework.

test automation framework

Our Automation Framework has two parts,

  • Core
  • Document360

Core Library

Our core library has all the standard utilities which are required to write and execute tests right away, irrespective of the application like

  • Creating various browser driver instances
  • Selenium wrapper methods and custom methods
  • Excel Class to read the test data from the Excel file.
  • Mailer to read Outlook mail and validate its controls.
  • A web client for REST API methods (Get/Post/Put/Del)
  • Snippet methods to validate the API response.

Document360 library

Document360’s automation framework combines modular-driven and data-driven approaches, in which we split modules and organize them in the same structure as in the application. All the test data are kept separately from the script for easy maintenance.

Our framework also follows the Page Object Model (POM) design pattern. Every page, including the blade and popups in Document360, is considered an object, and separate classes are created for each page to have its web elements and methods to interact with it. All the web elements on the page are initialized using a page factory with polling intervals to avoid unnecessary wait time and “NoSuchElementException” due to external factors.

Document360 automation test framework has the following components.

Base Layer:

This Layer is a test bed for all other classes. It has pre- and post-scripts to run each test case in our automation suite.

Configuration Layer:

This Layer contains the configuration-related data and its classes. It has data like threshold limits, URLs, and credentials details for different environments (like DEV/QA/PROD) that need to be used in our application.

Test Layer:

The Test Layer comprises test classes containing the automated steps to validate the available cases and their corresponding page object classes.

Data Layer:

This Layer has all the input data needed to pass it to test scripts stored in a separate file and maintained globally to reuse it everywhere required.

API Layer:

We allow customers to integrate Document360 as an extension with helpdesk and team collaboration applications like Freshdesk, Slack, Microsoft Team, and many more.

Not all the cases from these modules can be automated through UI alone to ensure functionality, and populating the high volume of test data for modules like analytics and bulk operation is a tedious one. We addressed these kinds of challenges at the API level.

Document360 APIs are well secured, and we need a valid bearer token and project id to access Document360 portal APIs which we extracted from headers using Selenium Chrome DevTools Protocol (CDP)

This Layer has logic to read the API details to maintain in Excel and generate a request to send it to the web client and receive server responses.

Reporting

We have robust reporting mechanisms, implemented using “Extent Reports” to generate a clear report with all relevant information about the tests. We logged exceptions and screenshots in case of failure for further analysis. This Layer holds all the screenshots and reports generated for each test run.

The sample extent report dashboard with failures

extent report dashboard

Test execution using Azure pipeline

We integrated CI/CD pipeline (Azure DevOps) with our automation project to execute the automated cases and give feedback about the build quality faster.

We have set up two different pipelines, one to execute all the automated cases on the scheduler configured and another to run cases from the test suite we have in Azure Test Plan on a demand basis.

A successful outcome of our test automation

At first, we could not measure the outcome of our automation framework accurately like other automation teams, we expected test cases to fail or be unstable due to other factors.

To overcome this, we identified and ignored the flaky tests in execution to avoid misleading results. We ran the test suite constantly to fix the flakiness in tests and included it in the test run.

Once a robust framework was in place, the test cases in the regression suite were automated and stabilized. We have seen huge progress and reaped the following benefits of automation:

Saved time and effort 

Automation in the regression cycle, automated cases that required checking for different data in the suite. The execution was fast and gave us the results in a few minutes. It reduced our testing time for those cases from a day to a few hours.

Identifying bugs in the earlier stages 

We have configured our automation script to run daily This helps us to identify bugs in the early testing stage rather than the regression phase.

Conclusion

Our test automation framework uses a hybrid approach that is designed and developed to be robust, easy to maintain, scalable, and very flexible to execute end-to-end testing with all necessary features. Ultimately it’s helping us to reduce total testing time and manual tester effort.

An intuitive technical documentation software to easily add your content and integrate it with any application. Give Document360 a try!

GET STARTED
Document360

 

The post Test Automation Framework: How we built it for Document360 appeared first on Document360.

]]>
How we redesigned the analytics data processing in Document360 https://document360.com/blog/analytics-data-processing/ Wed, 15 Jun 2022 12:26:09 +0000 https://document360.com/?p=6221 The database is one of the most crucial parts of any application’s performance. ...

The post How we redesigned the analytics data processing in Document360 appeared first on Document360.

]]>
The database is one of the most crucial parts of any application’s performance. When it comes to Document360 we always thrive to improve the performance of the application considering the highly scalable SaaS environment.

We were constantly trying to improve our application’s performance, and while closely monitoring the application for any setbacks & improvements, we found out that there’s a significant number of database writes that’s been happening every day through a particular endpoint.

There are 2 sides to Document360, one being the portal where the user will be writing articles, reviewing them, and managing the overall knowledge base. The second part is the knowledge base site where the customers will just consume the contents of the knowledge base.

An intuitive knowledge base software to easily add your content and integrate it with any application. Give Document360 a try!

GET STARTED
Document360

Deep diving further

In layperson’s terms, a public-facing knowledgebase site will get more views compared to the portal where the people will write articles and manage the knowledge base. We started monitoring all the endpoints that are being consumed by the customer-facing knowledge base sites and collected the metrics for them.

Being a knowledge base, tracking is one of the most important parts of the application where we show the knowledge base total number of views/reads/likes/dislikes, etc… All this information must be collected when users visit the Knowledge base site and we consolidate & show the metrics on the portal. We noticed that for collecting analytics Earlier we have been used this API (UpdateTrackingInformation) and this is responsible for collecting all the metrics from the Knowledge base site & writing them to the database.

Imagining a basic flow

Whenever a user comes to the Knowledge base site, the user may visit multiple articles, read them, spend time on some articles where it requires more context, or the user may even like/dislike various articles. Now even if we consider a rough estimate that each user sees at least 5 articles and interact with them, that is 5 separate database hits to write the information to our database.

dbHits_before-Document360

Looking at the average number of hits that have been made to this API is having a huge impact on our database. The average number of hits per day is 145K and when we see it for a week the numbers are very huge 821K. We are sure that we ought to do something to address this problem.

The solution we arrived

Analytics is not the most immediate information required instantly. Whenever 500 users visit the site, we thought that it does not make sense to show analytics instantly in the portal, as nobody in the knowledge base would be looking at analytics for the current date time or today.

We have completely changed our analytics architecture so that the number of DB hits made to the database is drastically lower than earlier. The final architecture that we arrived at is represented in the below diagram.

Analytics Architecture-Document360

We started to use queuing mechanism to consolidate & write the results to the database by grouping the results based on the project. For sake of simplicity, let’s consider there are two websites.

There may be multiple users visiting the documentation site of the products for various use cases. Based on our new architecture all the information that is collected for Document360 will be grouped into a single set and written to the database in a single BulkWrite operation. In this way, we reduce the maximum number of connections and writes that are being made to the database.

The new metrics chart after we rolled out our analytics architecture. On average per day, the number of database writes is 2K and for a week the number stands at 12K

dbHits_after-Document360

Conclusion

The difference is huge, we can see a slight decrease in our overall operational costs including the API servers and our database. So, consider queuing for any such scenarios where data like analytics is not required immediately henceforth the application’s performance can be improved by significantly reducing the overall load on the servers & database.

  Old Implementation New Architecture
Daily Database Writes 144,993 2,135
Weekly Database Writes 821,628 12,813

Interested in Document360 Knowledge base? Schedule a demo with one of our experts

Book A Demo
Document360

The post How we redesigned the analytics data processing in Document360 appeared first on Document360.

]]>
How we Improved SEO Performance for Document360 https://document360.com/blog/seo-performance-for-document360/ Mon, 28 Mar 2022 05:53:54 +0000 https://document360.com/?p=5873 Search engines have become an integral part of our everyday lives; Google has ...

The post How we Improved SEO Performance for Document360 appeared first on Document360.

]]>
Search engines have become an integral part of our everyday lives; Google has even become a verb in the English language. Every business, therefore, needs to pay attention to its search engine ranking. In Document360, we had recently encountered a challenge with SEO ranking. So, before we jump into the problem let us understand how crawling & rendering works.

How does Crawling and Rendering work?

A Google bot or a computer that has a list of links from our website known as ‘sitemap’ will be available on every site provided by the site owners. When the crawler finds a page, it tries to render the page like what the browser does, but without any user context.

Most of the content is rendered on the server and it is ready to be viewed by the browser on request. Server-side rendering allows for an amazingly fast experience on the site with quick initial load times and less JavaScript to be painted. But still, most applications cannot just rely on complete SSR.

Having JavaScript on the client allows us to do ‘event handling’ and run logic on the client with little to no requests to the server to perform client-side operations.

The Document360 Knowledge Base experience

All knowledge base sites have a few sections in common. These are very standard and will be available on any knowledge base site that you visit.

  • Categories tree to navigate between content (left)
  • Content part (middle)
  • Table of contents (right)
  • Search (top)

So far, we have not spoken about the actual problem yet. Recently some of our customers have started complaining that the knowledge base SEO is having an impact and the users are having trouble finding content using search engines. After our initial analysis, we have found out the mechanism in which we load the content on the page was causing an impact on the SEO.

The implementation that we had to fetch the content is done once after the client is initialized and an ‘ajax’ request is made to fetch the contents of the currently selected article and the content is painted on the DOM later. The knowledge base was loaded based on the below steps.

  • User opens a URL Eg:  [https://docs.document360.com/docs/february-2023-release-note]
  • The overall layout of the page is rendered on the server
  • The server returns the overall rendered layout page along with some data that is required for doing some rendering on the client.
  • Once the layout is initialized the client sends a request to the server to fetch content for the current article, the network request URL looks like this ‘{subDomain}/load-article/{slug}’
  • To give a more exact example, the URL might look like this https://docs.document360.com/docs/february-2023-release-note

    Do you notice the problem here? The actual URL where the user is viewing the article is shown in the screenshot below.


    Document360 SEO-1


    This is the same URL a google bot will crawl, but it was not able to find the content of the article because google does not know that we load the content via a sub nested route ‘load-article’. So, this is obvious that this is a fundamental problem and has a massive impact on our SEO. This led to a couple more issues
  • Duplicate results on Google Search
  • Google cached content is empty

    Document360-SEO-2

    When we viewed the ‘cached’ page of the public site, it was just empty. So, we ventured out on an optimal and strong solution that will improve our SEO score as well as not lead to any more problems in the future.

Here’s how we solved the problem:

We were still convinced that we should not reload the entire page when the user switches between articles from the category tree, so we anyway had to make an ‘ajax’ call. But we need the content to be painted without painting the entire page.

Let us imagine two scenarios:

  • A user visits the page and reads the articles by navigating the tree
  • A bot or spider crawling the page on the links

Also Read: How to SEO Your Knowledge Base Articles

Scenario 1: User visits a page

When a user is visiting the page, as mentioned above we should only paint the content on navigating between articles. But the same is not true for case 2, when a bot visits a URL, it just needs to crawl through the content, it does not care or know whether we paint the content again or not.

A better example to understand it better. From a user perspective, when a user browses through articles, we remove the nested route called ‘ load-article’ and just initiate a request to the actual URL with some additional query parameters to inform the server that this request is initiated by a user.


Document360-SEO-3


The URL looks like this ‘{subDomain}/release-notes/?partialView=on’. Google will consider a URL with and without parameters as two different URLs. To resolve the problem, we added a canonical tag so Google will ignore the URL with query parameter [More Reference on Google Docs].

A site can have query params to preserve the state etc. So, when this request hits the server, the server responds with only the content. The content block once received will be painted on the client.

Document360-SEO-4

Scenario 2: Bot visits a page

When a bot visits the page, we render the entire content of the page on the server. When a bot visits a page, it only knows the URL of the content directly via the sitemap.

Document360-SEO-5

Final words

We deployed this solution and we observed it for a couple of weeks internally and found that this approach works better and improved our metrics measured via Google Lighthouse.

Before

Document360-SEO-6


After
Document360-SEO-7

If you are interested in more in-depth research on the workings of SEO, you can check out the references below.

An intuitive knowledge base software to easily add your content and integrate it with any application. Give Document360 a try!

Get Started
Document360

The post How we Improved SEO Performance for Document360 appeared first on Document360.

]]>