Featured Post

15 Python Tips : How to Write Code Effectively

Image
 Here are some Python tips to keep in mind that will help you write clean, efficient, and bug-free code.     Python Tips for Effective Coding 1. Code Readability and PEP 8  Always aim for clean and readable code by following PEP 8 guidelines.  Use meaningful variable names, avoid excessively long lines (stick to 79 characters), and organize imports properly. 2. Use List Comprehensions List comprehensions are concise and often faster than regular for-loops. Example: squares = [x**2 for x in range(10)] instead of creating an empty list and appending each square value. 3. Take Advantage of Python’s Built-in Libraries  Libraries like itertools, collections, math, and datetime provide powerful functions and data structures that can simplify your code.   For example, collections.Counter can quickly count elements in a list, and itertools.chain can flatten nested lists. 4. Use enumerate Instead of Range     When you need both the index and the value in a loop, enumerate is a more Pyth

8 top AWS tricky interview Questions

In this post, I have explained AWS (Amazon Web Services) tricky interview questions. The EBS, AMI, S3 and Amazon instance included in my questions

Q1. Explain Elastic Block Storage? What type of performance can you expect? How do you back it up? How do you improve performance?

A1. EBS is a virtualized SAN or storage area network. That means it is RAID storage to start with so it’s redundant and fault-tolerant. If disks die in that RAID you don’t lose data.

Great! It is also virtualized, so you can provision and allocate storage, and attach it to your server with various API calls. No calling the storage expert and asking him or her to run specialized commands from the hardware vendor.
 
Performance on EBS can exhibit variability. That is it can go above the SLA performance level, then drop below it. The SLA provides you with an average disk I/O rate you can expect.

This can frustrate some folks especially performance experts who expect reliable and consistent disk throughput on a server. Traditional physically hosted servers behave that way. Virtual AWS instances do not.
AWS Interview Questions
AWS Interview Questions
Backup EBS volumes by using the snapshot facility via an API call or via a GUI interface like elastic fox. Improve performance by using Linux software raid and striping across four volumes.
Q2. What is S3? What is it used for? Should encryption be used?

A2. S3 stands for Simple Storage Service. You can think of it like FTP storage, where you can move files to and from there, but not mount it like a file system. 

AWS automatically puts your snapshots there, as well as AMIs there. Encryption should be considered for sensitive data, as S3 is a proprietary technology developed by Amazon themselves, and as yet unproven vis-a-vis a security standpoint.
Q3. What is an AMI? How do I build one?

A3. AMI stands for Amazon Machine Image. It is effectively a snapshot of the root file system. Commodity hardware servers have a BIOS that points the master boot record of the first block on a disk. 
A disk image though can sit anywhere physically on a disk, so Linux can boot from an arbitrary location on the EBS storage network.
Build a new AMI by first spinning up and instance from a trusted AMI. Then adding packages and components as required. Be wary of putting sensitive data onto an AMI. 
For instance, your access credentials should be added to an instance after spinup. With a database, mount an outside volume that holds your MySQL data after spinup as well.
Q4. Can I vertically scale an Amazon instance? How?

A4. Yes. This is an incredible feature of AWS and cloud virtualization. Spinup a new larger instance than the one you are currently running. Pause that instance and detach the root EBS volume from this server and discard it. 

Then stop your live instance, detach its root volume. Note the unique device ID and attach that root volume to your new server. And then start it again. Voila, you have scaled vertically in-place!! Read online for more questions

Comments

Popular posts from this blog

How to Fix datetime Import Error in Python Quickly

SQL Query: 3 Methods for Calculating Cumulative SUM

Python placeholder '_' Perfect Way to Use it