Speed, Time and Distance Question and Word Problems

Speed, Time and  Distance word Problems

Time and Distance shortcut tricks, Formula, Method and Notes


Speed, Time and Distance:
Speed =  Distance/Time ,    Time =Distance/Speed,  Distance = (Speed x Time).

Speeds Ratio of A and B is a : b, then the ratio of the times taken by then to cover the same distance is (1 / a) : ( 1 / b) or  b : a.
Suppose a man covers a certain distance at x km/hr and an equal distance at y km/hr. Then,
the average speed during the whole journey is  2xy    / (x + y)    km/hr.





  1. An aeroplane covers a certain distance at a speed of 240 kmph in 5 hours. To cover the same distance in 1 hours, it must travel at a speed of:
    1. A. 300 kmph     
    2. B. 360 kmph      
    3. C. 600 kmph      
    4. D. 720 kmph        Correct Answer
  2.  

    A person crosses a 600 m long street in 5 minutes. What is his speed in km per hour?
    1. A. 3.6     
    2. B. 7.2        Correct Answer
    3. C. 8.4      
    4. D. 10      
  3.  

    How many seconds does Puja take to cover a distance of 500 m, if she runs at a speed of 30 km/hr?
    1. A. 60 sec       Correct Answer
    2. B. 82 sec      
    3. C. 95 sec      
    4. D. 100 sec      
  4.  

    An aeroplane covers a certain distance at a speed of 240 kmph in 5 hours. To cover the same distance in 1 hours, it must travel at a speed of:
    1. A. 300 kmph     
    2. B. 360 kmph      
    3. C. 600 kmph      
    4. D. 720 kmph        Correct Answer
  5.  

    A cyclist covers a distance of 800 meter in 4 minutes 20 seconds. What is the speed in km/hr of the cyclist?
    1. A. 6.2 km/h     
    2. B. 8.4 km/hr      
    3. C. 11.05 km/hr        Correct Answer
    4. D. 16.07 km/hr      
  6.  

    If a person walks at 14 km/hr instead of 10 km/hr, he would have walked 20 km more. The actual distance travelled by him is:
    1. A. 50 km       Correct Answer
    2. B. 56 km      
    3. C. 70 km      
    4. D. 80 km      
  7.  

    A train can travel 50% faster than a car. Both start from point A at the same time and reach point B 75 kms away from A at the same time. On the way, however, the train lost about 12.5 minutes while stopping at the stations. The speed of the car is:
    1. A. 100 kmph     
    2. B. 110 kmph      
    3. C. 120 kmph        Correct Answer
    4. D. 130 kmph      
  8.  

    Excluding stoppages, the speed of a bus is 54 kmph and including stoppages, it is 45 kmph. For how many minutes does the bus stop per hour?
    1. A. 9     
    2. B. 10        Correct Answer
    3. C. 12      
    4. D. 20      
  9.  

    A man walking at the rate of 6 km/hr crosses a bridge in 15 minutes. The length of the bridge is ______.
    1. A. 1000 m     
    2. B. 1250 m      
    3. C. 1500 m        Correct Answer
    4. D. 1800 m      
  10.  

    Two girls move in opposite directions, one from A to B and other from B to A. The girl from A reaches the destination in 16 hrs and girl from B reaches her destination in 25 hrs, after having met. If former's speed is 25 km/hr, what will be the speed of latter?
    1. A. 10 km/hr     
    2. B. 12 km/hr      
    3. C. 16 km/hr      
    4. D. 20 km/hr        Correct Answer
  11.  

    Two buses start at the same time, one from P to Q and the other from Q to P. If both buses reach after 4 hours and 16 hours at Q and P respectively after they cross each other, what would be the ratio of speeds of the bus starting from P and that of the one starting from point Q?
    1. A. 2 : 1       Correct Answer
    2. B. 1 : 2      
    3. C. 2 : 2      
    4. D. 1 : 4      
  12.  

    Walking 6/7th of his usual speed, a man is 12 minutes too late. The usual time taken by him to cover that distance is :
    1. A. 1 hr 20 min     
    2. B. 1 hr 10 min      
    3. C. 1 hr 11 min      
    4. D. 1 hr 12 min        Correct Answer
  13.  

    In a flight of 600 km, an aircraft was slowed down due to bad weather. Its average speed for the trip was reduced by 200 km/hr and the time of flight increased by 30 minutes. The duration of the flight is:
    1. A. 1 hour       Correct Answer
    2. B. 2 hours      
    3. C. 3 hours      
    4. D. 4 hours      
  14.  

    Two towns P & Q are 275 km apart. A motorcycle rider starts from P towards Q at 8 a.m. at the speed of 25 km/hr. Another rider starts from Q towards P at 9 a.m. at the speed of 20 km/hr. Find at what time they will cross each other?
    1. A. 2.45 p.m.     
    2. B. 2.30 p.m.        Correct Answer
    3. C. 1.35 p.m.      
    4. D. 1.15 p.m.      
  15.  

    Walking 6/7th of his usual speed, a man is 12 minutes too late. The usual time taken by him to cover that distance is :
    1. A. 1 hr 20 min     
    2. B. 1 hr 10 min        Correct Answer
    3. C. 1 hr 11 min      
    4. D. 1 hr 12 min      
  16.  

    A man takes 5 hours 45 min. In walking to a certain place and riding back. He would have gained 2 hours by riding both ways. The time he would take to walk both ways is :
    1. A. 11 hrs 45 min       Correct Answer
    2. B. 3 hrs 45 min      
    3. C. 7 hrs 30 min      
    4. D. 7 hrs 45 min      
  17.  

    A man complete a journey in 10 hours. He travels first half of the journey at the rate of 21 km/hr and second half at the rate of 24 km/hr. Find the total journey in km.
    1. A. 220 km     
    2. B. 224 km        Correct Answer
    3. C. 230 km      
    4. D. 234 km      
  18.  

    An aeroplane flying 1000 km covers the first 200 km at the rate of 200 km/hr, the second 200 km at 400 km/hr, the third 200 km at 600 km / hr & last 200 km at the rate of 800 km/hr. Determine the average speed of the aeroplane.
    1. A. 250 km/hr     
    2. B. 300 km/hr      
    3. C. 480 km/hr        Correct Answer
    4. D. 600 km/hr      
  19.  

    Two trains start from P and Q respectively and travel towards each other at a speed of 50 km/hr and 40 km/hr respectively. By the time they meet, the first train has travelled 100 km more than the second. The distance between P and Q is :
    1. A. 500 km     
    2. B. 630 km      
    3. C. 900 km        Correct Answer
    4. D. 660 km      
  20.  

    The ratio between the speeds of two trains is 7 : 8. If the second train runs 400 km in 4 hours, then the speed of the first train is:
    1. A. 70 km/hr     
    2. B. 75 km/hr      
    3. C. 84 km/hr      
    4. D. 87.5 km/hr        Correct Answer
  21.  

    Jennifer travels first 4 hours of her journey at a speed of 80 miles/hr and the remaining distance in 6 hours at a speed of 30 miles/hr. What is her average speed in miles/hr?
    1. A. 50 miles / hr       Correct Answer
    2. B. 60 miles / hr      
    3. C. 75 miles / hr      
    4. D. 92 miles / hr      
  22.  

    Two trains starting at the same time from two stations 200 km apart and going in opposite directions cross each other at a distance of 110 km from one of the stations. What is the ratio of their speeds ?
    1. A. 11:9       Correct Answer
    2. B. 11:20      
    3. C. 9:20      
    4. D. 11:8      
  23.  

    A man on tour travels first 160 km at 64 km/hr and the next 160 km at 80 km/hr. The average speed for the first 320 km of the tour is:
    1. A. 35.55 km/hr     
    2. B. 36 km/hr      
    3. C. 71.11 km/hr        Correct Answer
    4. D. 71 km/hr      
  24.  

    A and B walk around a circular track. They start at 9 a.m. from the same point in the opposite directions. A and B walk at a speed of 2 rounds per hour and 3 rounds per hour respectively. How many times shall they cross each other before 9.30 a.m.?
    1. A. 8     
    2. B. 7        Correct Answer
    3. C. 6      
    4. D. 5      
  25.  

    In covering a distance of 30 km, Abhay takes 2 hours more than Sameer. If Abhay doubles his speed, then he would take 1 hour less than Sameer. Abhay's speed is:
    1. A. 5 kmph       Correct Answer
    2. B. 6 kmph      
    3. C. 6.25 kmph      
    4. D. 7.5 kmph      
  26.  

    Two guns were fired from the same place at an interval of 10 minutes and 30 seconds, but a person in the train approaching the place hears the second shot 10 minutes after the first. The speed of the trian (in km/hr), supposing that speed travels at 330 metres per second, is:
    1. A. 50.4     
    2. B. 111.80      
    3. C. 19.88      
    4. D. 59.4        Correct Answer
  27.  

    Robert is travelling on his cycle and has calculated to reach point A at 2 P.M. if he travels at 10 kmph, he will reach there at 12 noon if he travels at 15 kmph. At what speed must he travel to reach A at 1 P.M.?
    1. A. 8 kmph     
    2. B. 11 kmph      
    3. C. 12 kmph        Correct Answer
    4. D. 14 kmph      
  28.  

    A thief is noticed by a policeman from a distance of 200m. The theif starts running and the policeman chases him. The thief and the policeman run at the rate of 10 km and 11 km per hour respectively. What is the distance between them after 6 minutes?
    1. A. 100 m       Correct Answer
    2. B. 120 m      
    3. C. 110 m      
    4. D. 130 m      
  29.  

    It takes eight hours for a 600 km journey, if 120 km is done by train and the rest by car. It takes 20 minutes more, if 200 km is done by train and the rest by car. The ratio of the speed of the train to that of the cars is:
    1. A. 2 : 3     
    2. B. 3 : 2      
    3. C. 3 : 4        Correct Answer
    4. D. 4 : 3      
  30.  

    A walks at 4 kmph and 4 hours after his start, B cycles after him at 10 kmph. How far from the start does B catch up with A?
    1. A. 62.6 km     
    2. B. 26.7 km        Correct Answer
    3. C. 22.8 km      
    4. D. 19.5 km      
  31.  

    A farmer travelled a distance of 61 km in 9 hours. He travelled partly on foot @ 4 km/hr and partly on bicycle @ 9 km/hr. The distance travelled on foot is:
    1. A. 14 km     
    2. B. 15 km      
    3. C. 16 km        Correct Answer
    4. D. 17 km      
  32.  

    A walks around a circular field at the rate of one round per hour while B runs around it at the rate of six rounds per hour. They start in the same direction from the same point at 7.30 a.m. They shall first cross each other at:
    1. A. 5.30 a.m     
    2. B. 6.42 a.m      
    3. C. 7.55 a.m      
    4. D. 7.42 a.m        Correct Answer
  33.  

    Two men starting from the same place walk at the rate of 5 kmph and 5.5 kmph respectively. What time will they take to be 8.5 km apart, if they walk in the same direction?
    1. A. 12 hrs     
    2. B. 14 hrs      
    3. C. 15 hrs      
    4. D. 17 hrs        Correct Answer
  34.  

    It takes eight hours for a 600 km journey, if 120 km is done by train and the rest by car. It takes 20 minutes more, if 200 km is done by train and the rest by car. The ratio fo the speed of the train to that of the car is :
    1. A. 3:3 km     
    2. B. 3:5 km      
    3. C. 3:4 km        Correct Answer
    4. D. 2:3 km      
  35.  

    In covering a distance of 30 km, Amla takes 2 hours more than Peter. If Amla doubles his speed, then he would take 1 hour less than Peter. Amla’s speed is :
    1. A. 7 kmph     
    2. B. 6.5 kmph      
    3. C. 5.5 kmph      
    4. D. 5 kmph        Correct Answer
  36.  

    A boy goes to his school from his house at a speed of 3 km/hr and returns at a speed of 2 km/hr. If he takes 5 hours in going and coming. the distance between his house and school is :
    1. A. 4.5 km     
    2. B. 5.5 km      
    3. C. 6 km        Correct Answer
    4. D. 7 km      
  37.  

    A person travels equal distances with speeds of 3 km/hr, 4 km/hr and 5 km/hr and takes a total time of 47 minutes. The total distance (in km) is :
    1. A. 1     
    2. B. 2      
    3. C. 3        Correct Answer
    4. D. 4      
  38.  

    A person has to cover a distance of 6 km in 45 minutes. If he covers one-half of the distance in two-thirds of the total time; to cover the remaining distance in the remaining time, his speed (in km/hr) must be :
    1. A. 7 km/hr     
    2. B. 8 km/hr      
    3. C. 11 km/hr        Correct Answer
    4. D. 12 km/hr      
  39.  

    Sound is said to travel in air at about 1100 feet per second. A man hears the axe striking the tree, 11/5 seconds after he sees it strike the tree. How far is the man from the wood chopper?
    1. A. 2420 ft       Correct Answer
    2. B. 2524 ft      
    3. C. 2600 ft      
    4. D. 2740 ft      
  40.  

    A farmer travelled a distance of 61 km in 9 hours. He travelled partly on foot at 4 km/hr and partly on bicycle at 9 km/hr. The distance travelled on foot is :
    1. A. 1 hr 16 min       Correct Answer
    2. B. 1 hr 17 min      
    3. C. 1 hr 18 min      
    4. D. 1 hr 19 min      
  41.  

    In covering a distance of 30 km, Amit takes 2 hrs more than Suresh. If Amit doubles his speed, then he would take 1 hour less than Suresh. Amit's speed is
    1. A. 5 km/hr       Correct Answer
    2. B. 7.5 km/hr      
    3. C. 6 km/hr      
    4. D. 6.25 km/hr      
  42.  

    Two cars are running along the same road. The first one, which is running at the rate of 30 km/hr, starts 6 hrs ahead of the second one, which is running at the rate of 50 km/hr. How long will it take the second car to catch up with the first one?
    1. A. 6 hrs     
    2. B. 9 hrs        Correct Answer
    3. C. 12 hrs      
    4. D. 15 hrs      
  43.  

    A train can travel 20% faster than a car. Both start from the point A at the same time and reach point B 75 km away from A at the same time. On the way, however, the train lost about 12.5 mins while stopping at the stations. The speed of the car is
    1. A. 50 km/hr     
    2. B. 55 km/hr      
    3. C. 60 km/hr        Correct Answer
    4. D. 65 km/hr      
  44.  

    Wheels of diameters 7 cm and 14 cm start rolling simultaneously from X and Y, which are 1980 cm apart, towards each other in opposite directions. Both of them make same number of revolutions per second. If both of them meet after 10 s, the speed of the smaller wheel is
    1. A. 22 cm/s     
    2. B. 44 cm/s      
    3. C. 66 cm/s        Correct Answer
    4. D. 132 cm/s      
  45.  

    An express train travelled at an average speed of 100 km/hr, stopping for 3 mins after every 75 km. A local train travelled at a speed of 50 km/hr, stopping for 1 minute after every 25 km. If the trains began travelling at the same time, then how many kilometres did the local train travel in the time it took the express train to travel 600 km?
    1. A. 307.5 km       Correct Answer
    2. B. 900 km      
    3. C. 1200 km      
    4. D. 1000 km      
  46.  

    There are 20 poles with a constant distance between each pole. A car takes 24 s to reach the 12th pole. How much time will it take to reach the last pole?
    1. A. 25.25 s     
    2. B. 17.45 s      
    3. C. 35.75 s      
    4. D. 41.45 s        Correct Answer
  47.  

    A student got down at a tram stop A and walked the remaining distance to school. If he had stayed in the tram until the next stop B and then walked to school he would have taken a minute longer. If he had walked the entire distance from A to school at twice his usual speed, he would have taken as much time as the tram would take for travelling from A to B. If the school is 300 m from A, and 100 m from B, the walking speed of the student in km/hr is
    1. A. 2(1/2)     
    2. B. 3        Correct Answer
    3. C. 3(1/2)      
    4. D. 4      
  48.  

    A circular running path is 726 m in circumference. Two men start from the same point and walk in opposite directions @ 3.75 km/hr and 4.5 km/hr respectively. When will they meet for the first time?
    1. A. 5.5 mins     
    2. B. 6.0 mins      
    3. C. 5.28 mins        Correct Answer
    4. D. 4.9 mins      
  49.  

    Two trains 100 m and 80 m long, run at the rate of 30 km/hr and 50 km/hr respectively on parallel rails. How long will it take a man sitting in the second train to pass the first train if they run in opposite direction?
    1. A. 2.4 s     
    2. B. 4.5 s        Correct Answer
    3. C. 8.3 s      
    4. D. 11.2 s      
  50.  

    A car travelled 75% of the distance from town A to B by travelling at T hrs at an average speed of V km/hr. The car travels at an average speed of S km/hr for the remaining part of the trip. Which of the following expressions represents the average speed for the entire trip?
    1. A. (12VS/V + S)     
    2. B. (4VS/3S + V)        Correct Answer
    3. C. (VT/3S)      
    4. D. None of these

AWS IAM Account and Policy


IAM (Identity Access Management) in AWS is services which control the access of AWS Resource and Services which is always user Based.
  • AWS IAM provide the Facility of User Management,  AWS Resource and services access control management, Security Management of AWS resource. It defines the user Access permission to the AWS Services. 
  • Every AWS account is assigned with the root account which controls everything including resource access, users, security etc. Root Account is the head of your account which have the full power of AWS IAM Resource. Never Share the root account credential with any one. Don't Use the root account for your daily task or for your administrative purpose. 
  • Root User is called the creator of the account Which have the full permission and access to the AWS Resource. 
  • By default 5000 users can be created per AWS account Using IAM. At a time you can add 10 user.
  • By default you can create max 300 Groups per AWS account using IAM.
  • You can create 1000 roles per AWS Account using IAM.
  • IAM User can be the member of 10 Group.
  • IAM services is available free of cost. And it is not region specific. IAM is Global services.
  • While creating group in IAM, you can't create group inside group. Nested group is not possible in IAM AWS.
  • Using IAM in AWS you can control the resource access and action by applying various default policy and IAM inline policy 
AWS IAM Policy


 Feature of IAM in AWS

  • Shared Access to your AWS Account with giving them the root Credential.
  • Granular Permission means here is level of access to the AWS resource. Example sometime you want to give user only Read Permission.
  • Secure Access of Application which will run on EC2 Instance.
  • Multifactor Authentication 
  • Identity Federation
  • Identity Information for Assurance.(You can check which user have access which resource using log record).
  • PCS DSS compliance (PCI : Payment card Industry, DSS : Data Security Standard).
  • Eventually Consistent and highly Available.

AWS IAM Terms

  • Principal ( Principal can be Users Perform and use the resources or It can be Application also because sometime request will go through the Application, Roles etc. )
  • Request : Principal which send the request.
  • Authentication :  Authentication will check and verify the principal. Only Authentic Users can have the access of the AWS Resource.
  • Authorization : Authorization check the level of task permission and restrict the task performed by the authentic user if it is not permitted and assigned to him. 
  • Action / Operation : Any task what you performed which is authorized to do by root user. 
  • Resources : It's Basically AWS resource. 

IAM Default Policy and Inline Policy


AWS Autoscaling and Amazon Auto Scaling Group

AWS auto Scaling Group

Most of the company is migrating to the cloud because of Scalability, Fault Tolerance, High Availability of resource. AWS Auto scaling Group is one of the most important feature of AWS cloud. 

Scalability or Autoscaling have the same mean. In terms of Cloud Scalability or AWS Autoscaling means based on the requirement scaling the server resource up and down to meet the users request requirement without fault Tolerance and with high availability of resource .

  • AWS Autoscaling is region Specific Amazon services.
  • Auto scaling is a process of scaling (Scale Out[Increase] or Scale In[Decrease]) your EC2 Instance up or down based on the set of condition. 
  • Amazon Autoscaling is Horizontal Scaling of EC2 Resource. This Horizontal scaling ensure that you must have the right number of server to handle the Request.
  • Auto Scaling help in the cost Management. In cost management Auto scaling don't have extra charge for creating instance in AWS ASG.
  • Instance Running only you can include in Autoscaling Group. Terminated or Stopped Instance can't be included in ASG Group. 
  • EC2 instance can be the part of only one Auto scaling Group. It can't be the part of Multiple auto scaling Group. You can have multiple AWS ASG but we can't attach single EC2 Instance in multiple ASG.
  • When you want to delete the AWS Auto scaling group first you have to detach the Existing EC2 of that particular ASG and then you can delete it.  If you delete the ASG without detaching the EC2 instance then it will delete the EC2 Instance also.
  • We can attache multiple Elastic Load balancer with auto scaling group. 
  • Whenever you apply Scale-Out Policy you must apply Scale-in Policy also. Other wise your cost will come high.
  • If you are creating AWS ASG using CLI then the basic monitoring will be 60 second. But if you are using console then the basic monitoring time will be 300 second (5 min). Through CLI by default it will be detailed monitoring will be created which is chargeable. Basic Monitoring is free of cost.
  • Merging of AWS ASG is possible only through CLI(Command Line Interface).

Component of AWS Autoscaling


Launch Configuration : In launch Configuration we define the type of instance, Key pair, AMI, Security Group. Once the Launch configuration is created after that you can't edit it. You can only delete it or Copy it.

Auto Scaling Group : Here we define the AWS ASG name, group Size, Group Subnet , vpc etc.

Scaling Policy : Metric Type, Target Value

Autoscaling Group always try to balance the EC2 Instance distribution across Region AZ's. Because if it is not balanced then in case of any failure of AZ's the load will come to the other AZ's for short time. To avoid that AWS Autoscaling Group distribute instance equally in multiple AZ's in that region itself (Autoscaling is Region Specific.). Below is the image as a example.


SNS (Simple Notification Services) in Auto Scaling Group sends email in four condition  which is below for your reference. SNS is chargeable services.

  • An Instance Is Launched
  • An Instance is terminated
  • An Instance is fail to launch
  • An Instance is fail to terminate 

Amazon Auto Scaling Policy

  • Manual AWS Auto Scaling Policy ( In this scaling Policy the Min and Max Number of server will be same in all the condition.)
  • Dynamic AWS Auto Scaling policy ( In this scaling Policy the Min and Max Number of server will not be same and based on the condition it increase within the min and max range)
    • Target Tracking Policy : In this policy we define the target. To maintain that target AWS ASG will increase or decrease the EC2 Instance. Like we are setting the target that one EC2 instance can have 70% of traffic. If that traffic will cross 70% automatically new EC2 instance will be launched. Target Tracking Policy always maintain the level of 70%. If it traffic decreases across all the Instance then it will terminate the EC2 instance and bring down the instance. In this we define or set the CPU Utilization. Below is the Image where target Tracking Policy we set.
      AWS ASG Target Tracking Policy
       
    • Simple Scaling Policy :
    • Step Scaling Policy :  We have to set Increase and decrease group Size as well as we have to the alarm before applying this scaling policy.
    • Predictive Scaling / Schedule Scaling / Cyclic Scaling : Predictive scaling will check the traffic history and based on the history it will scale up and down. Or we can decide like Scale Out on Saturday and Sunday. It uses machine learning Help and help in Scaling Out and In

AWS Route 53 DNS and Amazon Route53 Hosted zone

AWS Route 53 and DNS Management

AWS Route 53 is mainly for 

A) DNS Management
B) Traffic Management
C) Availability Management (Server Health Check)
D) Domain Registration

DNS (Domain Name Server) it's like a phone-book. It actually translate the Domain name in to IP address. Whatever the Device is connected with the internet have the Unique IP which we cant remember easily. So that's why Name came in picture. DNS will translate that name to IP Address.

For Example :

website: www.example.com have the Unique IP 111.111.1.11. Whenever any request comes using the www.example.com DNS will translate it into the respective IP.

Port Number is used to identify the specific process or request comes via internet or network and it forward to the server for further processing. Port 53 sets a communications protocol for the Internet network layer, transport layer, and session layer. Name server basically route the traffic to the server.

Route 53 name server function


Why Named Amazon Route53?


Route53 which manages our DNS runs on port number 53. Any request comes to Route 53 it will translate the Web address to specific IP address for further communication with the server. 

We can perform all sort of task using Route53 Hosted Zone such as DNS Management, Domain name Registration, Domain transfer, Server health check and traffic management etc.

Points to Remember about Amazon Route53:

  • Route53 is Global Services like IAM.
  • Route 53 supports IPV6 also. AWS Provide two type of domain one is Generic Top level domain(.com, .net, .org etc) and second one is Geographic Top level domain(.in, .uk, .us etc)
  • Multiple Hosted zones can be created with the same name but the name server inside the hosted zone will be different. 
  • Route 53 assign four name server to hosted zone which will be different and unique.
  • SOA (Start of Authority) will contain the information about the hosted zone what you create.
  • Transfer of Domain is possible between two AWS account for that you must contact The AWS Support.
  • When you migrate domain name from one AWS Account to other AWS Account in that case only domain get transferred not Route53 hosted zone.

AWS Route53 Function request handling  


AWS Route 53 dns resolver


There is two type of hosted Zone, Public and Private Hosted Zone. Whenever we create or register a  domain using Route 53 at that time Four  name server and one SOA(Start of Authority) is created automatically.

Supported Route 53 DNS Record Type


A Record(IPV4): It map the Domain name to IP Address (IPV4 which is 32 bit).

AAAA Record(IPV6):  It map the Domain name to IPV6 Address (IPV6 Which is 128 bit)

CNAME Record (Canonical Name Record) : It  will point the different URL format to the registered URL.You cant create the CNAME for the top domain (Main Domain).

Example:  example.com, www.example.com, http://example.com all are same this all canonical name must point to single domain what you wish among the list. 

amazon route53 hosted zone









NS Record :  Which point to your server or name server or Domain name server is same.

SOA (Start of Authority) : SOA contain all the information about the Domain owner, changes made in the hosted zone. It contain the authoritative server detail.

MX Record: MX Record maintain the record of mail created using the mail. example info@example.com

Route 53 Hosted Zone Policy

  • Simple Routing(By Default) : Simple Routing is very simple routing policy. At the time of creating record set if we don't select routing policy by default it will be assigned.  
  • Failover Routing : In this Failover Routing Policy we create two server one as a primary server and second as a standby server. Initially all the request will be sent to the primary server in case of primary server failure the standby server will be activated and the request will be serve by standby server.  
  • Geolocation Routing : This Routing we apply when we have server in various location. Like if we have server in India and HTTP requests are coming from the India. In that case the traffic will be redirected to that particular geo location Instead of redirecting the traffic to other location. This routing policy will work if we have server in multiple location and you want to serve the local content.  
  • Multivalue Answer Routing: Multiple IP will be assigned to handle the request.
  • Latency Based Routing : Latency based routing will serve the request wherever it can get the faster response. Again it is similar to Geolocation routing but latency based routing is not location specific. if your request is getting response faster from USA then routing will serve your request from there. 
  • Weighted Routing : Here we defined the traffic weight-age. Means you will decide that how much % traffic will go to which server. 
  • Geo Proximity:

The average of 11 numbers is 30. If the average of first six

  1. The average of 11 numbers is 30. If the average of first six


  2. The average of 11 numbers is 30. If the | Solutions


  3. The average of 11 numbers is 30. If the average of first six numbers is 17.5 and that of last six is 42.5, then what is the sixth number?
  1. A. 30           👈Correct Answer
  2. B. 36
  3. C. 45
  4. D. 50
  1. Answer & Explanation:
    Sum of 11 Number is 11 x 30 = 330

    Given : 

     [ Avg of first 6 numbers is 17.5, so Sum of first Six Number is 6 x 17.5 ]

     [ Avg of Last 6 numbers is 42.5, so Sum of last Six Number is 6 x 42.5 ]

    6th Number :  ( Sum of first Six Number + Sum of last Six Number ) - 330

    Hence the 6th Number is 30

  1. Related Question on The Average of:

  1. The average marks scored by Ganesh in English, Science, Mathematics and History is less than 15 from that scored by him in English, History, Geography and Mathematics. What is the difference of marks in Science and Geography secured by him?
  1. A. 40
  2. B. 50
  3. C. 60
  4. D. Data inadequate
  1. Answer : C ( 60 )

  1. The average weight of three men A, B and C is 84 kg. D joins them and the average weight of the four becomes 80 kg. If E, whose weight is 3 kg more than that of D, replaces A, the average weight of B, C, D and E becomes 79 kg. The weight of A is
  1. A. 65 kg
  2. B. 70 kg
  3. C. 75 kg
  4. D. 80 kg
  1. Answer : C ( 75 kg )

  1. In a class of 100 students the average marks obtained by a student in Maths is 44. If we remove the highest and the lowest the average of the class becomes 43.92. A total of three students get either highest or lowest. What is the average of these three students?
  1. A. 73.33
  2. B. 46.66
  3. C. 59.99
  4. D. cannot be determined
  1. Answer : B ( 46.66 )

  1. Find the average of first 20 natural numbers ?
  1. A. 6
  2. B. 7.5
  3. C. 10.5
  4. D. 12
  1. Answer : C ( 10.5 )

  1. The average of 8 men is increased by 2 years when 2 of them whose ages are 21 and 23 years as replaced by two new men. The average age of two new men is 
  1. A. 22 years
  2. B. 24 years
  3. C. 28 years
  4. D. 30 years
  1. Answer : D ( 30 years )

  1. The average age of a class is 15.8 years. The average age of the boys in the class is 16.4 years and that of the girls is 15.4 years. What is the ratio of boys to girls in the class ?
  1. A. 2 : 3
  2. B. 2 : 4
  3. C. 3 : 4
  4. D. 3 : 5
  1. Answer : A ( 2 : 3 )

  1. The average weight of 8 men is increased by 1.5 Kg when one of the men who weights 65 Kg is replaced by a new man. The weight of the new man is
  1. A. 65 Kg
  2. B. 77 Kg
  3. C. 82 Kg
  4. D. 90 Kg
  1. Answer : B ( 77 Kg )

  1. A hiker walked for two days. On the second day, the hiker walked 2 hrs. longer and at an average speed of 1 km per hour faster than he walked on the first day. If during the two days he walked a total of 64 km and spent a total of 18 hrs. walking, what was his average speed on the first day?
  1. A. 2 km/h
  2. B. 3 km/h
  3. C. 4 km/h
  4. D. 5 km/h
  1. Answer : B ( 3 km/h )

  1. The average age of 8 persons in a committee is increased by 2 years when two men aged 35 years and 45 years are substituted by two women. The average age of these two women is
  1. A. 41 years
  2. B. 45 years
  3. C. 48 years
  4. D. 53 years
  1. Answer : C ( 48 years )

  1. Of the four numbers whose average is 60, the first is one-fourth of the sum of the last three. The first number is
  1. A. 15
  2. B. 45
  3. C. 48
  4. D. 25

  1. Answer : C ( 48 )

MongoDB Drop, Truncate and Delete Collection

Delete, Drop and Truncate collections in MongoDB
We will perform all the mongoDB Aggregation Operator on studentInfo DB. Create studentInfo Database in MongoDB server. Use the below code for creating the DB.

  

In the above studentInfo Mongo Database we will create many collection and we will perform mongoDB Delete Collection.

Use command db.createCollection("collectionName")  , this query we will use and create collection in the studentInfo DB.

Below is the video reference for dropping and deleting the Collection in Mongo.




Create Collection In studentInfo DB, below is the query to create the collection.

db.createCollection("studentPersonal") 

db.createCollection("studentMarks")

studentPersonal, studentMarks Collection will be created using above two Mongo Query.

Mongodb Drop Collection Query


Now we will use db.collectionName.drop()  for dropping collection in MongoDB. So as we created the collection named with studentPersonal and studentMarks. MongoDB delete and Drop collection will perform in these two collection.
db.studentPersonal.drop()
db.studentMarks.drop()
This above two query will delete the studentPersonal and studentMarks collection from MongoDB.

Note : If there will not be a single collection in the mongoDB then the studentInfo DB will not be visible.

Mongodb Truncate Collection Query

Sometime you want to truncate the Collection in MongoDB instead of Dropping or Deleting the Collection. In that case you must use remove() method on the collection which you want to truncate.


Syntax for MongoDB Collection Truncate 

db.collection.remove(<query>,<justOne>)
So if we want to truncate the collection we must have to use remove() method. <justOne > is optional here which limits the deletion of document.

We will Truncate the teacherInfo Collection using below command.
db.teacherInfo.remove({})
This above query will truncate the collection in MongoDB.

Our Feature Post

There is a tree between houses of A and B If the tree leans on As House

    There is a tree between houses of A and B. If the tree There is a tree between houses of A and B. If the tree leans on A’s House, the t...

Our Popular Post