DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Don’t Ignore Response Codes — They Tell a Story About Your System

Don’t Ignore Response Codes — They Tell a Story About Your System

See why paying attention to response codes can help you get to the bottom of issues in performance testing.

Harinder Seera user avatar by
Harinder Seera
·
Aug. 15, 18 · Opinion
Like (1)
Save
Tweet
Share
2.80K Views

Join the DZone community and get the full member experience.

Join For Free

On a dark, gloomy day in Melbourne with rain pouring down our office windows, the team and I were debating whether we should test AWS S3 or not for our new architecture. After a bit of healthy debating, we agreed to run a performance test against the new architecture that leverages AWS Cloudfront and S3 functionality. The objective of the test was to check if we configured Cloudfront and S3 correctly, and also to see if they can handle anticipated static content load.  At this point, you might say, "Well, Cloudfront can handle 100,000 requests/sec per distribution and S3 can handle 5500 GET requests/sec, why the need?" Well, so did we, until we discovered an issue none of us anticipated, and if left unfixed, would have impacted end user experience (and potentially sales).

To test this scenario, we copied all the static content from our existing production infrastructure to the new infrastructure and used the current CDN to work out the load profile we needed to generate the right load. Once this activity was done, I quickly created a JMeter script and generated the load using Octoperf.

Following is the HTTP response code pie chart Octoperf generated after the test run. Nothing too exciting, except I have 7.6% HTTP 404 responses and remaining 92.4% HTTP 200 responses.

2018-08-13_10h29_43

At this point, I started thinking, "I don’t see ~7.5% 404’s for static content in production, and since the data was copied from production and I am using static content URLs from production, something doesn’t feel right." I raised my observation with the rest of the team, and within an hour of our investigation, we found out the real issue.

The real issue was related to how Windows and Linux interpret the file path. The existing architecture runs on Windows OS, and Windows, by default, is not case-sensitive for the file paths, whereas Linux (S3 bucked mounted) is, by default. What this means, from a customer point of view, is that they will receive a 404 for product images (just as an example) as Linux OS will try to resolve the image path to a location in the S3 bucket, but, because of the case-sensitive issue, the path won’t exist and will therefore return a 404 to the customer, and that won’t be a good experience. For example, the following is the response I got for one of the static requests from Cloudfront. Notice the "N" in the file path — the real folder in the S3 bucket ends with "n" and NOT "N." Therefore, I get a 404, whereas Windows is not case-sensitive and treats them the same, and I get the right response.

2018-08-13_22h27_38

During your performance testing, make sure you are also looking at the response codes, as they can tell you a lot about your system. Also, AWS S3 and Cloudfront were able to handle the anticipated load.

CloudFront AWS

Published at DZone with permission of Harinder Seera. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Multi-Tenant Architecture for a SaaS Application on AWS
  • Integrate AWS Secrets Manager in Spring Boot Application
  • 10 Most Popular Frameworks for Building RESTful APIs
  • Building the Next-Generation Data Lakehouse: 10X Performance

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: