Amazon Interview Question for Software Engineer / Developers


Country: India
Interview Type: In-Person




Comment hidden because of low score. Click to expand.
2
of 2 vote

developer.yahoo.com list for performance

Make Fewer HTTP Requests
Use a Content Delivery Network (CDN)
Add Expires or Cache-Control Header
Gzip Components
Put Stylesheets at Top
Put Scripts at Bottom
Avoid CSS Expressions
Make JavaScript and CSS External
Reduce DNS Lookups
Minify JavaScript and CSS
Avoid Redirects
Remove Duplicate Scripts
Configure ETags
Make Ajax Cacheable
Flush Buffer Early
Use GET for Ajax Requests
Postload Components
Preload Components
Reduce the Number of DOM Elements
Split Components Across Domains
Minimize Number of iframes
Avoid 404s
Reduce Cookie Size
Use Cookie-Free Domains for Components
Minimize DOM Access
Develop Smart Event Handlers
Choose <link> Over @import
Avoid Filters
Optimize Images
Optimize CSS Sprites
Do Not Scale Images in HTML
Make favicon.ico Small and Cacheable
Keep Components Under 25 KB
Pack Components Into a Multipart Document
Avoid Empty Image src

developer.yahoo.com/performance/rules.html

- vgokulraj March 14, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

This is a very generic question and thrown to check the Web development skills.
The answer at high level would include:
1. Enabling gzip compression for the responses.
2. enabling caching for the static content. e.g. images, headers, logos, CSSs, js
3. Paginating the the large resultsets
These are at very high level without considering the scalability, high availability. Those aspects open different chapters altogether.

- lovecode March 11, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

First you have to profile the website, then find the bottleneck and try to fix it. It may be a DB indexing problem or something else.

- abousamra March 11, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

And how would you profile a website?

- cha March 11, 2014 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

IMO, we need to understand what Optimize means. For example, at a very high level, it could mean one of the following

+ Optimize Functionality
	++ Better placement of frames
	++ Better relational logic
+ Optimize Performance
	++ Faster loading of pages
	++ Better readahead of related pages
	++ More simultaneous operations.
+ Optimize Quality
	++ no plugin crashes, etc etc
+ Optimize Security
	++ .....

- smallchallenges March 11, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

0. Profile the site using Chrome dev tools and check the Audits panel
1. Cache static resources to reduce HTTP requests
2. Minify/Merge JS and CSS files to reduce file size and bandwidth
3. Use CDN to increase the number of files simultaneously downloaded
4. Use Redis to reduce DB accesses
5. Buy a more powerful server
6. Cache jQuery objects when possible
7. Put <script> tags at the bottom of the HTML
8. Prevent to much DOM manipulation
9. Use varnish or nginx reverse proxy
10. Enable gzip compression in the server
11. Use Connection: keep-alive header in order to reuse existing TCP connection and prevent additional TCP handshakes
12. Use SVG sprite instead of separate images for icons to reduce HTTP requests
13. Remove unused scripts and CSS styles

- saringan.emanuel March 11, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Use AWS Cloud front.

caching static content
caching dynamic content for a small time ( 1sec, 1 minute, depend)
Route your data to the closest server ( CDN )
tcp optimizations: keep alive connections to reuse connections and avoid 3wayhanshake

- .·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º> March 12, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I would check why the optimisation is necessary

- Satish Kumar March 16, 2014 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More