Blog
ApacheNIFI interview questions and answers
- March 8, 2021
- Posted by: Lara Administrator
- Category: Interview Question and Answers
ApacheNIFI interview questions and answers
ApacheNIFI interview questions and answers
Question 1. What Is Apache Nifi?
Answer :NiFi allows create DataFlow. It method you may switch information from one device to every other device in addition to manner the information in between.
Question 2. What Is Nifi Flowfile?
Answer :
A FlowFile is a message or occasion information or consumer information, that is driven or created withinside the NiFi. A FlowFile has specifically matters connected to it. It is content material (Actual payload: Stream of bytes) and attributes. Attributes are key-price pairs connected to the content material (You can say metadata for the content material).
Question 3. What Is Relationship In Nifi Dataflow?
Answer :
When a processor finishes with the processing of FlowFile. It can bring about Failure or Success or some other courting. And primarily based totally in this courting you may ship information to the Downstream or subsequent processor or mediate accordingly.
Question 4. What Is Reporting Task?
Answer :
A Reporting Task is a NiFi extension factor this is able to reporting and reading NiFi’s inner metrics to offer the facts to outside sources or record popularity facts as announcements that seem immediately withinside the NiFi User Interface.
Question 5. What Is A Nifi Processor?
Answer :
The processor is a primary thing withinside the NiFi, in order to paintings at the FlowFile content material and allows in growing, sending, receiving, reworking routing, splitting, merging, and processing FlowFile.
Question 6. Is There A Programming Language That Apache Nifi Supports?
Answer :
NiFi is applied withinside the Java programming language and permits extensions (processors, controller services, and reporting tasks) to be applied in Java. Besides, NiFi helps processors that execute scripts written in Groovy, Jython, and numerous different famous scripting languages.
Question 7. How Do You Define the Nifi Content Repository?
Answer :As we noted previously, contents aren’t saved withinside the FlowFile. They are saved withinside the content material repository and referenced via way of means of the FlowFile. This permits the contents of FlowFiles to be saved independently and successfully primarily based totally at the underlying garage mechanism.
Question 8. What Is The Backpressure In Nifi System?
Answer :Sometimes what takes place that the Producer device is quicker than the patron device. Hence, the messages which can be ate up are slower. Hence, all of the messages (FlowFiles) which aren’t being processed will continue to be withinside the connection buffer. However, you may restriction the relationship backpressure length both primarily based totally at the quantity of FlowFiles or the quantity of information length. If it reaches a described restriction, the relationship will deliver lower back stress to the manufacturer processor now no longer run. Hence, no extra FlowFiles are generated, till backpressure is reduced.
Question 9. What Is The Template In Nifi?
Answer :
The template is a reusable workflow. Which you may import and export withinside the identical or distinct NiFi instances. It can store a number of time instead of growing Flow, once more and once more, every time. The template is created as an XML report.
Question 10. What Is The Bulleting And How It Helps In Nifi?
Answer :
If you need to understand if any issues arise in a dataflow. You can test withinside the logs for something interesting, it’s miles lots extra handy to have notifications pop up at the screen. If a Processor logs something as a WARNING or ERROR, we are able to see a “Bulletin Indicator” display up withinside the top-right-hand nook of the Processor.
This indicator seems like a sticky be aware and might be proven for 5 mins after the occasion occurs. Hovering over the bulletin affords facts approximately what passed off in order that the consumer does now no longer should sift thru log messages to locate it. If in a cluster, the bulletin may also suggest which node withinside the cluster emitted the bulletin. We also can extrade the log degree at which announcements will arise withinside the Settings tab of the Configure conversation for a Processor.
Question 11. Do The Attributes Get Added To Content (real Data) When Data Is Pulled By Nifi?
Answer :
You can actually upload attributes on your FlowFiles at any time, that’s the complete factor of setting apart metadata from the real information. Essentially, one FlowFile represents an item or a message transferring thru NiFi. Each FlowFile carries a chunk of content material, that is the real bytes. You can then extract attributes from the content material, and save them in memory. You can then perform towards the ones attributes in memory, with out touching your content material. By doing so that you can store a number of IO overhead, making the complete glide control manner extraordinarily efficient.
Question 12. What Happens, If You Have Stored A Password In A Dataflow And Create A Template Out Of It?
Answer :
The password is a touchy belongings. Hence, at the same time as exporting the DataFlow as a template password might be dropped. As quickly as you import the template withinside the identical or distinct NiFi device.
Question 13. How Does Nifi Support Huge Volume Of Payload In A Dataflow?
Answer :
A massive quantity of information can transit from DataFlow. As information actions thru NiFi, a pointer to the information is being handed around, called a FlowFile. The content material of the FlowFile is handiest accessed as needed.
Question 14. What Is A Nifi Custom Properties Registry?
Answer :
You can use to load custom key, price pair you may use custom residences registry, which may be configured as (in nifi.residences report)
nifi.variable.registry.residences=/conf/nifi_registry
And you may positioned key-price pairs in that report and you may use that belongings for your NiFi processor the usage of expression language e.g. $ when you have configured that belongings withinside the registry report.
Question 15. Does Nifi Works As A Master-slave Architecture?
Answer :
No, from NiFi 1.zero there’s zero-grasp philosophy is considered. And every node withinside the NiFi cluster is the identical. NiFi cluster is controlled via way of means of the Zookeeper. Apache ZooKeeper elects a unmarried node because the Cluster Coordinator, and failover is treated routinely via way of means of ZooKeeper. All cluster nodes record heartbeat and standing facts to the Cluster Coordinator. The Cluster Coordinator is answerable for disconnecting and connecting nodes. Additionally, each cluster has one Primary Node, additionally elected via way of means of ZooKeeper.
16 What’s Apache NiFi?
Apache NiFi is an employer integration and dataflow automation device that lets in causing, receiving, routing, reworking, and enhancing information as required and anyone this may be computerized and configurable. NiFi has the do one aspect to companion united suggest structures and every 2nd shape of deliver and locations has long past protocol, FTP, HDFS, class device, completely one-of-a-kind databases, etc.
17 What’s MiNiFi?
MiNiFi can be a subproject of Apache NiFi that is supposed as a marginal information accumulating proper of admission that dietary supplements the middle tenets of NiFi, focusing except as a hint to the p.s. of facts on the deliver of its set in motion. MiNiFi is supposed to control at once on the deliver, that’s why its unique significance is regulated to the low footprint and coffee aid consumption. MiNiFi is on the market in Java as deftly as C++ marketers that rectangular degree ~50MB and 3.2MB in length severally.
18 What’s the function of Apache NiFi withinside the large information Ecosystem?
The major roles Apache NiFi is ok for in Big Data device are:
- · Data acquisition and delivery.
- · Transformations of facts.
- · Routing information from interchange deliver to vacation spot.
- · Event shelling out.
- · End to mention no rootage.
- · Edge suitable judgment and bi-directional communication.
19 What rectangular measures the maximum alternatives of NiFi?
The major alternatives of Apache NiFi are:
- · Highly Configurable: Apache NiFi is deeply athletic in configurations and lets in the US to have a take a observe what excellent of configuration we generally tend to twinge. as an example, some of the chances are:
- · Loss affected person steel detail secured delivery
- · Low latency vs High outturn
- · Dynamic prioritization
- · Flow is regularly modified at runtime
- · Backpressure
- · Designed for Extention: we are able to assemble our processors and controllers etc.
- · Secure
- · SSL, SSH, HTTPS, encrypted content material etc.
- · Multi-tenant authorization and inner authorization/coverage dispensation
· MiNiFi Subproject: Apache MiNiFi can be a subproject of NiFi that reduces the footprint to approx. 40 MB, whilst now no longer facilitate and is rather beneficial alongside withinside the thick of we, generally tend to extra marginal word to rule information pipelines in low aid environments.
20 What’s Apache NiFi used for?
- · Reliable and secure switch of facts withinside the thick of periodical structures.
- · Delivery of facts from deliver to every 2nd vacation spot and platform.
- · Enrichment and guidance of information:
- · Conversion withinside the thick of formats.
- · Extraction/Parsing.
- · Routing choices.
21 What’s a waft document?
FlowFiles rectangular degree the middle of NiFi and its dataflows. A FlowFile can be a information record, that includes a pointer to its content material and attributes that protruding to the content material. The content material is that the pointer to the precise information this is vertebrate dealt with and consequently the attributes rectangular degree key-fee pairs that war as facts for the waft document. some of the attributes of a waft document rectangular degree document name, UUID, MIME Type, etc.
22 What’s the a part of the waft document?
A FlowFile is fashioned taking place of two components:
1. Content: The content material can be a movement of bytes that incorporates a pointer to the precise information being processed withinside the dataflow and is transported from deliver to vacation spot. detain thoughts the waft document itself doesn’t include the data, instead it’s a pointer to the content material information. the precise content material can courtroom docket case the Content Repository of NiFi.
2. Attributes: The attributes rectangular degree key-fee pairs that rectangular degree related following the data and match due to the facts for the waft document. These attributes rectangular degree normally won’t develop values that in reality presents context to the data. some of the samples of attributes rectangular degree document name, UUID,
MIME Type, Flowfile making time, etc.
23 What’s a processor?
NiFi processors rectangular degree the constructing block and consequently the maximum on the whole used components in NiFi. Processors rectangular degree the blocks that we generally tend to tug and fall regarding the canvas and information flows rectangular degree created taking place of compound processors. A processor is regularly used for switch information into the device thinking about GetHTTPS, GetFile, ConsumeKafka, etc. or are regularly used for interchange a few excellent of facts transformation or enrichment, as an example, SplitJSON, ConvertAvroToOrc, ReplaceText, ExecuteScript, etc.
24 Do NiFi and writer overlap in functionality?
This is a completely not unusualplace question. Apache NiFi and the writer replacement solutions. An writer dealer presents every one low latency specifically as soon as we’ve got an outsized variety of buyers actuation from the same topics. Apache writer presents information pipelines and coffee latency, but, the writer isn’t supposed to clear up dataflow demanding situations i.e. information prioritization and enrichment, etc. that’s what Apache NiFi is supposed for, it facilitates in developing with information waft pipelines which might also additionally manufacture consequences-dogfight information prioritization and supplementary modifications in the back of perturbing information from one device to a one-of-a-kind.
Furthermore, now no longer like NiFi, that handles messages antecedently impulsive sizes, the writer prefers smaller messages, withinside the pc reminiscence unit to MB range even though NiFi is extra gymnastic for dynamic sizes which may fit as much as GB in keeping with document or possibly extra.
Apache NiFi is substituted to Apache {kafka|Kafka|Franz writer|writer|writer} with the aid of using decision of all of the dataflow problems for Kafka.
25 Whereas configuring a processor, what’s the language syntax or formulation used?
NiFi functions a idea called publicity to ecosystem language this is supported with the aid of using taking below attention associated with the subject of a in keeping with belongings basis, this means that the developer of the processor will pick out whether or not or now no longer a belongings helps day trip language or now no longer.
26 Is there an synthetic language that Apache NiFi helps?
Apache NiFi is enforced in Java synthetic language and lets in for extensions to be enforced in Java. In adjoin, NiFi helps processors that kill scripts written in Groovy, Jython, and lots of different auxiliary scripting languages.
27 Will we generally tend to time table the waft to vehicle control as soon as one could in the back of the coordinator?
Bz default, the processors rectangular degree already for eternity twist as Apache NiFi is supposed to be functioning concerning the precept of non-stop streaming. Unless we generally tend to determine to unaided control a processor one aspect bearing in thoughts AN hourly or day these days as an example. However, designedly Apache NiFi isn’t an employment-orienting matter. Once we generally tend to region into the bureau a processor, it runs all of the time.
28 However do we generally tend to st es that Flume helps and consists of a Flume processor out of the bin?
NiFi as a result helps a few equal skills of Sqoop. as an example, GenerateTableFetch processor to be able to step by step fetch and parallel fetch carefully deliver desk partitions.
Ultimately, what we generally tend to lack to publicize is whether or not or now no longer we generally tend to rectangular degree the decision of a selected or singular use prosecution. IF consequently, later every person of the equipment can acquit yourself. NiFis foster can if fact be informed shine withinside the again we have a propensity to ponder mixture use instances physical dealt with at taking into notion and really critical waft dealing out alternatives bearing in thoughts interactive, precise-time command and rule as soon as complete facts rootage.
29 What takes place to facts if NiFi is going all alongside?
NiFi shops the data withinside the repository due to the fact it’s miles traversing via the device. There rectangular degree 3 key repositories:
1. The waft document repository.
2. The content material repository.
3. The rootage repository.
As a processor writes facts to a waft document, that’s streamed directly to the content material repository, bearing in thoughts the processor finishes, it commits the consultation. This triggers the rootage repository to be up to date to comprise the sports that took place for that processor and later on, the waft document repository is up to date to store masses of tune of anywhere withinside the waft the document is. Finally, the waft documents are regularly stricken by the likewise as-door-door queue withinside the waft. This exaggeration, if NiFi is going the period of at any narrowing, it’ll be adept to renew anywhere it left off. This, but, glosses at the extremity of one detail, this is that with the aid of using default following we have a propensity to replace the repositories, we have a propensity to write down the into to repository but this is {regularly|this will be} regularly cached with the aid of using the OS. withinside the row of any failure, this cached facts may be speculative if the OS fails on long past NiFi. If we generally tend to set attractions on of fact nonentity to keep away from this caching we are able to installation the repositories withinside the knife homes document to invariably regulate to disk. This, but, is usually a essential trouble to be in. If lonesome NiFi will the period of this now no longer be complex in any exaggeration to facts, as OS can despite the fact that be accountable for flushing that cached facts to the disk.
30 If no prioritizer rectangular degree set in a completely processor, what prioritization plot is used?
The default prioritization subject matter is said to be undefined, and it’s going to modify from time to era. If no prioritizer rectangular degree is set, the processor can type the data supported the FlowFiles Content Claim. This dependancy presents the most comparatively cheap analyzing of the data and consequently the best output. we’ve were given cited dynamical the default feels to preliminary In preliminary Out, but, without delay it’s based taking place for what gives the best do its stuff.
These rectangular degree some of the most generally used interview queries vis–vis Apache NiFi. To pass browsing a number of extraordinarily concerning Apache NiFi you’ll have the ability to test the magnificence Apache NiFi and entertain attain buy the newssheet for a number of related articles.
31 Will NiFi Flow document have unstructured facts as expertly?
Yes, FlowFile in NiFi may have every the Structured (e.g. XML, JSON documents) as aptly as Unstructured (Image documents) facts.
32 Wherever will the content material of FlowFile store?
FlowFile doesn’t accretion content material itself. It shops the point out of the contents, that rectangular degree continues withinside the content material repository.
33 Will NiFi installed as a facilitate?
Yes, it’s currently supported withinside the UNIX device and macOS lonesome.
34 What’s an affiliation with NiFi dataflow?
Once a processor finishes taking into notion than strolling FlowFile. It will upshoot in Failure or Success or any greater relationship. And supported this club you’ll be capable of ship facts to the Downstream or in the back of a processor or mediate consequently.
35 What’s the reportage Task?
Ans: A reportage Task can be a NiFi elaboration narrowing that’s alert of reportage and reading NiFi’s inner metrics to present the opinion to out of doors sources or document status to warn as announcements that appear at once withinside the NiFi interface.
36 Will the processor dedicate or rollback the consultation?
Yes, the processor is that the element via the consultation it’ll dedicate and rollback. If Processor rolls make sure the consultation, the FlowFile that have been accessed all through that consultation can every pension of one of being reverted to their preceding states. If a Processor as a substitute chooses to dedicate the consultation, the consultation is accountable for extrade the FlowFile Repository and rootage Repository in the back of the applicable opinion.
37 Will NiFi member to outside reassets Like Twitter?
Absolutely. NIFI consists of an surely protractile framework, allowing any developers/customers to join information deliver instrumentation pretty simply. Within the preceding professional pardon, NIFI 1.0, we generally tend to have 170+ processors bundled in the back of the equipment with the aid of using default, collectively with the twitter processor. Moving promise thinking about, supplementary processors/extensions will rather be supposed in every certainly considered one among freedom.
38 Will NiFi have any connectors following any RDBMS database?
Yes, you’ll be capable of use rotate processors bundled in NiFi to behave moreover than RDBMS in replacement ways. as an example, ExecuteSQL lets in you to the scenario a SQL pick out assertion to a designed JDBC affiliation to burning rows from a database; QueryDatabaseTable lets in you to incrementally fetch from a decibel desk and GenerateTableFetch lets in you to now no longer incrementally fetch the archives, but, and fetch neighboring deliver desk partitions. For a number of info on talking change processors: https://nifi.apache.org/docs.html
39 Whereas configuring a processor, what’s the language of syntax or system used?
NiFi consists of a assemble called dialogue language this is supported on the subject of a in keeping with-belongings basis, this means that the developer of a processor will pick out whether or not or now no longer a belongings helps drying language. is dialogue language is documented here: https://nifi.apache.org/docs/nifi-docs/html/publicity to feel-language-guide.html
40 Is there a programming language that Apache NiFi helps?
NiFi is enforced withinside the Java programming language and lets in extensions (processors, controller facilities, and reportage tasks) to be enforced in Java. withinside the insert, NiFi helps processors that execute scripts written in Groovy, Jython, and numerous different supplementary not unusualplace scripting languages.
41 Do the Attributes accumulate adscititious to content material (real know-how) following records is the pressure with the aid of using NiFi?
You can whole merger attributes for your FlowFiles at any time, that’s the construct-up development of setting apart records from the precise know-how. primarily, one FlowFile represents AN outlook or a observe disturbing via NiFi. each FlowFile carries a fragment of content material, this is that the real bytes. you’ll be capable of moreover extract attributes from the content material, and adjoin them in memory. you’ll be capable of moreover ham it taking place adjoining the ones attributes in memory, whilst now no longer shifting your content material. By comport your self befittingly you’ll be capable of store lots of IO overhead, growing the accumulated waft jogging approach definitely economical.
42 Any plans to contain in versioning to the NiFi medical doctors referring to the subject of the Apache site? presently, I will to your discover medical doctors for one.0.0, however .0.7.1 is that the strong comments, right?
Great idea, we’ve were given filed a JIRA in Apache domestic to invade this thought: https://issues.apache.org/jira/browse/NIFI-3005. we generally tend to definitely set up to assure versioning to NIFI medical doctors once we will.
43 if a large fileof Apache NiFi, however, I may need to apprehend for numerous of the processors that rectangular degree understandable withinside the Hortonworks know-how Flow record of NiFi, a rectangular degree they viable in Apache Nifi and may Apache NiFi nonetheless be actively advanced as earlier than lengthy as extra appendage functions?
HDF legit pardon is, and may usually be, based totally upon Apache NIFi releases. For any in addition NiFi alternatives adscititious in HDF, Apache equivalents will absolutely be ancient.
44 What is the function of Apache NiFi withinside the Big Data Ecosystem?
The major roles Apache NiFi is appropriate for in BigData Ecosystem are:
- Data acquisition and delivery.
- Transforamtions of records.
- Routing records from a unique supply to destination.
- Event processing.
- End to stop provenance.
- Edge intelligence and bi-directional communication.
45 . What are the primary functions of NiFi?
The major functions of Apache NiFi are:
- Highly Configurable: Apache NiFi is tremendously bendy in configurations and permits us to determine what type of configuration we need. For instance, a number of the opportunities are:
- Loss tolerant cs Guaranteed delivery
- Low latency vs High throughput
- Dynamic prioritization
- Flow may be changed at runtime
- Backpressure
- Designed for Extention: We can construct our processors and controllers etc.
- Secure
- SSL, SSH, HTTPS, encrypted content material etc.
- Multi-tenant authorization and inner authorization/coverage management
- MiNiFi Subproject: Apache MiNiFi is a subproject of NiFi which reduces the footprint to approx. forty MB simplest and could be very beneficial while we want to run records pipelines in low useful resource environments.
45. What is Apache NiFi used for?
- Reliable and stable switch of records among unique systems.
- Delivery of records from reassets to unique locations and platforms.
- Enrichment and instruction of records:
- Conversion among formats.
- Extraction/Parsing.
- Routing decisions.
46. What is a waft report?
FlowFiles are the coronary heart of NiFi and its dataflows. A FlowFile is a records record, which includes a pointer to its content material and attributes which aid the content material. The content material is the pointer to the real records that’s being dealt with and the attributes are key-price pairs that act as metadata for the waft report. Some of the attributes of waft documents are filename, UUID, MIME Type, etc.
47. What is the element of waft documents?
A FlowFile is made from parts:
1. Content: The content material is a flow of bytes which incorporates a pointer to the real records being processed withinside the dataflow and is transported from supply to destination. Keep in thoughts the waft report itself does now no longer include the records, as an alternative it’s far a pointer to the content material records. The real content material might be withinside the Content Repository of NiFi.
2. Attributes: The attributes are key-price pairs which can be related to the records and act because the metadata for the waft report. These attributes are commonly used to save values that offer context to the records. Some of the examples of attributes are filename, UUID,
MIME Type, Flowfile growing time, etc.
48 How to stop/begin Apache Web Server?
You can restart with the aid of using going to Apache example region >> bin folder and execute the apachectl script.
./apachectl stop
./apachectl begin
Copy
You may additionally use a script placed in /etc/init.d/. Mostly it’ll be named both “apache” or “https”
/etc/init.d/apache stop
/etc/init.d/apache begin
Copy
Another manner might be the use of services
https stop
carrier httpd begin
Copy
49 What is the default port for HTTP and HTTPS?
The default port for HTTP is eighty and HTTPS 443. Checkout default ports for different packages indexed here.
50 . Can you inform me the vital configuration report name?
httpd.conf is the primary configuration report utilized in Apache.
51 . How to test the model of jogging Apache Web Server?
There are more than one methods to discover this however extra correctly might be;
- Login to an internet server
- Go to apache example and bin folder
- Executed httpd with -v to get the model info.
[root@lab sbin]# ./httpd -v
Server model: Apache/2.2.15 (Unix)
Server built: Jul 18, 2016, 15:24:00
[root@lab sbin]#
Copy
Alternatively, you may additionally use the rpm command to test the established model.
[root@lab ~]# rpm -QA |grep httpd
https-2.2.15-54.el6.centos.x86_64
https-tools-2.2.15-54.el6.centos.x86_64
[root@lab ~]#
Copy
52 How to realize if an internet server is jogging?
There are more than one methods to discover this.
1. Login to an internet server and grep for “https” process
ps -ef |grep httpd
Copy
1. Check for any alert in your tracking dashboard.
2. Check in case your apache IP: port is out there withinside the browser
Ex: http://yourapacheserver.com
1. Check if the configured IP and port is listening at the server with netstat
netstat -and |grep eighty
Copy
53 . How to put in Apache HTTP?
There are 3 viable methods to get this established.
Using supply code – you may down load the supply and collect it.
- Download the present day launch from http://httpd.apache.org/down load.cgi
- Extract the supply with tar application or gzip application relying at the report type: .tar or .tar.gz
tar xvf HTTPd-1.2.3.tar
gzip -d httpd-1.2.4.tar.gz
Copy
- Navigate to wherein you extracted the supply thru the cd command and configure it the use of the ./configure command at the terminal
- Then collect it the use of the make command.
- Finally, use the make set up command to put in it.
If you need to discover extra alternatives on the way to configure it, you may employ the configure –help command.
YUM repository – in case your server is hooked up to the Internet or has an inner repository then you may use yum to put in it.
yum set up httpd
Copy
RPM – You can down load the necessary RPM package and use the rpm command.
rpm -ivh package-name.rpm
Copy
54. How to make certain Apache listens to simplest one IP deal with at the server?
This is frequently wished if you have more than one IPs at the server. To make certain Apache listens simplest on exact IP then you definitely want to explicitly point out IP and port withinside the Listen directive.
Ex:
Listen 10.10.10.10:eighty
Copy
55. How to make certain the Apache runs with non-root/no person user?
This is manageable with the aid of using including User & Group directive in httpd.conf report
User apache
Group apache
Copy
The above configuration instance will make certain it begins offevolved with the “apache” user. You should make certain customers exist at the server earlier than configuring it.
56. How do I disable listing indexing?
You can use “Options -Indexes” withinside the respective listing directive.
Ex:
Options -Indexes
Copy
57. Which module is needed to have redirection viable?
mod_rewrite is accountable for the redirection, and this should be uncommented in httpd.conf report.
LoadModule rewrite_module modules/mod_rewrite.so
Copy
58. Can you convert the listening port from default to some thing else?
Yes, it’s viable with the aid of using specifying the port wide variety withinside the Listen directive.
Ex: to make Apache concentrate on 9000 port to 10.10.10.10 IP deal with.
Listen 10.10.10.10:9000
Copy
59. How to stable a Website hosted on Apache Web Server?
There are more than one methods to stable the Apache webserver consisting of the subsequent.
- Implementing SSL
- Integrating with WAF (Web Application Firewall) like ModSecurity, etc.
- Using cloud-primarily based totally safety provider
60. What are the log documents generated with the aid of using Apache?
There are famous log documents created;
- access.log – all request info with the reputation code
- error.log – seize all of the mistakes inside apache or connecting to the backend
61. How to create a CSR?
You can both use the subsequent OpenSSL command or generate CSR online.
To create a brand new CSR with a personal key
OpenSSL req -out geek flare.CSR -newkey rsa:2048 -nodes -format geek flare.key
Copy
Check out the OpenSSL cheat sheet for extra commands.
62. What is Virtual Hosting?
Virtual Hosting in Apache permits you to host more than one web sites on a unmarried example. You can both create IP primarily based totally or Name primarily based totally on digital hosting.
63. What module is wanted to hook up with WebSphere?
mod_was_ap22_http.so should be delivered in httpd.conf report to combine with IBM WAS.
64. How to place Log degree in Debug mode?
Often wished whilst you are troubleshooting the problem and desire to seize extra info. You can extrade the logging degree to debug with the aid of using making sure the subsequent in httpd.conf report.
LogLevel debug
Copy
65. Which module is needed to allow SSL?
The mod_ssl module should be uncommented earlier than SSL implementation.
LoadModule auth_basic_module modules/mod_ssl.so
Copy
66. What’s the WebLogic module name?
mod_wl_22.so
67. What is the log degree to be had in Apache?
The default configuration is about to “warn” however, the subsequent is viable too.
- debug
- info
- warn
- observe
- crit
- alarm
- emerg
- error
68. What is DocumentRoot?
DocumentRoot directive is the configuration wherein you may specify the folder region from wherein the static documents might be served. It’s additionally referred to as WebRoot.
Default DocumentRoot region is /var/www/html
Copy
69. How to set upation battle or JAVA packages in Apache?
I am afraid, Apache is a Web Server, and Java-primarily based totally utility deployment isn’t viable with it. However, you may combine Java utility servers like WebLogic, WebSphere, JBoss wherein you may set upation battle, ear documents.
70. What’s the distinction among the Apache Web Server and Apache Tomcat?
Apache Web is an HTTP server to serve static contents wherein Tomcat is a servlet box to set upation JSP documents.
You can usually combine Apache HTTP with Tomcat, however, primarily based totally at the requirement you want to select both one. If you want a right internet server, then Apache HTTP else Tomcat for JSP-Servlet Container.
71. How can Apache act as a Proxy Server?
You can use a mod_proxy module to apply as a proxy server. The mod_proxy module may be used to hook up with the backend server like Tomcat, WebLogic, WebSphere, etc.
72. How to configure Apache log, so it captures the time taken to serve a request?
You can upload “%D” in httpd.conf document below LogFormat directive to seize the reaction time taken to serve the request. It will display time in microseconds.
LogFormat “%h %l %u %t “%r” %>s %b “%i” “%i” %D” combined
Copy
Restart the Apache internet server, and you could see the results.
182.19.197.23 – – [02/Oct/2016:10:32:25 +0000] “GET / HTTP/1.1” 403 4961 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36” 1515
182.19.197.23 – – [02/Oct/2016:10:32:25 +0000] “GET /icons/apache_pb.gif HTTP/1.1” 304 – “http://lab.geekflare.com/” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36” 424
182.19.197.23 – – [02/Oct/2016:10:32:25 +0000] “GET /icons/poweredby.png HTTP/1.1” 304 – “http://lab.geekflare.com/” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36” 472
Copy
73. What device do you operate for log analysis?
You were given to talk the reality however to provide you an concept you could use GoAccess, SumoLogic, or a few cited right here.
74. What are the Web Servers you’ve labored on along side Apache?
Again, you higher inform the reality however to make you aware, there are numerous internet servers withinside the marketplace consisting of the subsequent.
- Nginx
- Microsoft IIS
- LiteSpeed
- GWS
75. How to affirm httpd.conf document to make sure no configuration syntax mistakess?
https –t will assist you to test the syntax.
[root@lab httpd]# /usr/bin/httpd -t
Syntax OK
[root@lab httpd]#
Copy
Alternatively, you could use the apachectl command as well.
[root@lab ~]# /usr/bin/apachectl configtest
Syntax OK
[root@lab ~]#
Copy
76. How to carry out Apache overall performance benchmark?
You can use a device like ApacheBench, SIEGE to carry out the burden take a look at on internet servers consisting of Apache. Another choice to carry out a pressure take a look at on line to look the general how internet software plays below load.
77. How to get assist for Apache Web Server if some thing wrong?
Apache is an Open Source internet server, so there may be no enterprise-stage assist. However, you could improve a trojan horse report or ask a query on Stack Overflow.
78. How to make sure the webserver is getting commenced after a server reboot?
If strolling Linux, then you could positioned a script in /etc/init.d/ and allow to begin on boot the usage of the command
Let’s say you create a document known as apache and positioned below /etc/init.d
chkconfig –upload apache
chkconfig apache on
Copy
if on Windows, then make sure startup kind is selected “Automatic.”
79. what’s the distinction among Apache and Nginx internet server?
Both are categorised as a Web Server and right here are a number of the principle differences.
- Nginx is an event-primarily based totally internet server in which Apache is procedure primarily based totally
- Nginx is understood for higher overall performance than Apache
- Apache helps a extensive variety of OS in which Nginx doesn’t assist OpenVMS and IBMi
- Apache has a big variety of modules integration with backend software server in which Nginx remains catching up
- Nginx is light-weight and taking pictures the marketplace percentage rapidly. If you’re new to Nginx, then you will be interested by finding out my articles on Nginx.
80. How might you kill the Apache if graceful-prevent doesn’t paintings?
If strolling on Linux, they are able to use the kill command.
Find out the PID of Apache with the aid of using the usage of ps -ef |grep HTTP
Then kill it
kill $PIDNUMBER
Copy
if regular kill doesn’t paintings then attempt kill -9
kill -9 $PIDNUMBER
Copy
If on Windows, then stop the Apache challenge from Task Manager.
81. How to locate httpd.conf document in case you don’t recognize the set up location?
In Linux, you could use the locate command.
Let’s assume, you comprehend it need to be in /apps document machine then you could use the subsequent command.
locate /apps -call httpd.conf
Copy
But in case you aren’t certain approximately which document machine then you could do locate on / document machine however maintain it in thoughts it can take a long term primarily based totally on the general document machine size.
locate / -call httpd.conf
Copy
82. What are the unique flavors of Apache webserver you recognize?
- IBM HTTP Server – referred to as IHS and frequently used with IBM WebSphere Application Server
- Oracle HTTP Server- referred to as OHS frequently used with Oracle Weblogic server
83. Where is the Apache positioned withinside the facts middle location?
You can provide an explanation for primarily based totally to your experience, however, normally for Internet-going through applications, it might be withinside the Internet DMZ community and for intranet, middle community.
But once more this may fluctuate primarily based totally on software/organization.
84. How to cover server model information withinside the HTTP reaction header?
Add the subsequent in httpd.conf document and restart the webserver
ServerTokens Prod
ServerSignature Off
Copy
This will conceal the model and display the Server as “Apache” Only.
85. What does 200, 403 & 503 HTTP mistakess codes mean?
- 200 – content material discovered and served OK
- 403 – attempted to get admission to restrained document/folder
- 503 – the server is simply too busy to serve the request and in different words – provider unavailable.
- Refer HTTP Response Code infographic for greater.
86. How to disable hint HTTP requests?
Add the subsequent in httpd.conf document and restart the instance
traceable off
Copy
87. How to troubleshoot port warfare issue?
netstat might be beneficial to troubleshoot the port warfare issue. If strolling a couple of times on a unmarried server then it might be endorsed to have absolute IP: Port configured for Listen directive.
88 What is a processor?
NiFi processors are the constructing block and the maximum typically used additives in NiFi. Processors are the blocks that we drag and drop at the canvas and dataflows are made of a couple of processors. A processor may be used for bringing facts into the machine like GetHTTPS, GetFile, ConsumeKafka, etc. or may be used for doing a little form of facts transformation or enrichment, for instance, SplitJSON, ConvertAvroToOrc, ReplaceText, ExecuteScript, etc.
89. Do NiFi and Kafka overlap in functionality?
This is a completely not unusualplace query. Apache NiFi and Kafka are very complementary solutions. A Kafka dealer affords a completely low latency in particular whilst we’ve a big variety of purchasers pulling from the equal topic. Apache Kafka affords facts pipelines and occasional latency, however, Kafka isn’t designed to clear up dataflow demanding situations i.e. facts prioritization and enrichment, etc. That is what Apache NiFi is designed for, it enables in designing dataflow pipelines which could carry out facts prioritization and different adjustments whilst transferring facts from one machine to another.
Furthermore, not like NiFi, which handles messages with arbitrary sizes, Kafka prefers smaller messages, withinside the KB to MB variety whilst NiFi is greater bendy for various sizes that can pass as much as GB consistent with document or maybe greater.
Apache NiFi is complementary to Apache Kafka with the aid of using fixing all of the dataflow issues for Kafka.
90. While configuring a processor, what’s the language syntax or formulation used?
NiFi has a idea known as expression language that is supported on a consistent with assets basis, which means the developer of the processor can pick whether or not a assets helps expression language or not.
91. Is there a programming language that Apache NiFi helps?
Apache NiFi is carried out in Java programming language and permits for extensions to be carried out in Java. Besides, NiFi helps processors that execute scripts written in Groovy, Jython, and numerous different scripting languages.
92. Can we agenda the waft to autorun like one could with a coordinator?
Bz default, the processors are already constantly strolling as Apache NiFi is designed to be running at the precept of non-stop streaming. Unless we choose to handiest run a processor on an hourly or every day foundation for example. But through layout Apache NiFi isn’t always a job-orientated thing. Once we begin a processor, it runs constantly.
93. How are we able to determine among NiFi vs Flume cs Sqoop?
NiFi helps all use instances that Flume helps and additionally has a Flume processor out of the box.
NiFi additionally helps a few comparable abilties of Sqoop. For example, GenerateTableFetch processor which does incremental fetch and parallel fetch in opposition to supply desk partitions.
Ultimately, what we need to study is whether or not we’re fixing a particular or singular use case. IF so, then anyone of the equipment will work. NiFi’s blessings will shine while we bear in mind more than one use instances being dealt with without delay and crucial waft control capabilities like interactive, real-time command and manage with complete records provenance.
94. What takes place to records if NiFi is going down?
NiFi shops the records withinside the repository as it’s miles traversing thru the system. There are three key repositories:
1. The waft document repository.
2. The content material repository.
three. The provenance reposiroty.
As a processor writes records to a waft document, this is streamed without delay to the content material repository, while the processor finishes, it commits the session. This triggers the provenance repository to be up to date to consist of the activities that came about for that processor after which the waft document repository is up to date to maintain song of wherein withinside the waft the document is. Finally, the waft documents may be moved to the subsequent queue withinside the waft. This manner, if NiFi is going down at any point, it will likely be capable of resume wherein it left off. This, however, glosses over one detail, that is that through default while we replace the repositories, we write the into to repository however that is frequently cached through the OS. In case of any failure, this cached records is probably misplaced if the OS additionally fails at the side of NiFi. If we need to keep away from this caching we are able to configure the repositories withinside the knife.properties document to constantly sync to disk. This, however, may be a widespread quandary to performance. If handiest NiFi does down this now no longer be complex in any manner to records, as OS will nevertheless be accountable for flushing that cached records to the disk.
95. If no prioritizers are set in a processor, what prioritization scheme is used?
The default prioritization scheme is stated to be undefined, and it could extrade from time to time. If no prioritizers are set, the processor will type the records primarily based totally at the FlowFile’s Content Claim. This manner, it presents the maximum green studying of the records and the best throughput. We have mentioned converting the default placing to First In First Out, however proper now it’s miles primarily based totally on what offers the pleasant performance.
These are a number of the maximum generally used interview questions concerning Apache NiFi. To study extra approximately Apache NiFi you may test the category Apache NiFi and please do enroll in the e-newsletter for extra associated articles.
96 How to put in the third-celebration module?
You can employ Apache Toolbox. Once downloaded, extract it the usage of the tar utility.
tar -xf Apachetoolbox-1.5.72.tar.gzCopy
Navigate to the folder Apachetoolbox-1.5.72 the usage of the cd command and run the command underneath to choose modules on your Apache server.
./install.shCopy
It presents modules including mod_ip_forwarding, mod_auth_mysql, and mod_auth_samba to assemble with the Apache webserver. Although you may consist of those modules manually, it’s miles simpler with Apache Toolbox.
97 How to assign more than one names to digital hosts?
You can employ the ServerAlias directive as proven underneath.
ServerName example.comServerAlias awesome.com fantastic.com
98How to restrict add size?
I actually have an internet software that permits customers to add documents including phrase documents, pdf, and so on. How do I restrict document add through customers?
You can employ the LimitRequestBody directive to restrict add document size.
LimitRequestBody 9000Copy
The price assigned to the LimitRequestBody permits Apache to just accept and keep document uploads of 9000 bytes through customers. You can regulate the price primarily based totally at the requirement.
99 How to limition get right of entry to through IPs?
You might also additionally need a number of the context root to be handy through allowed IPs. To do so, you may employ mod_authz_core or mod_authz_host modules to limition get right of entry to the usage of the Require directive.
Require 10.0.0.2 10.0.0.four 192.168.34.23 192.168.34.23
By doing above, Apache will serve requests handiest if requests are crafted from the indexed IPs.
You want to specify the Require directive withinside the listing wherein you need to permit or deny get right of entry to to resources.
100 How does your trying out engine works?
Once down load and set up to your PC, you may exercise take a look at questions, evaluate your questions & solutions the usage of specific options ‘exercise examination’ and ‘digital examination’. Virtual Exam – take a look at your self with examination questions with a time restrict, as in case you are taking checks withinside the Prometric or VUE trying out center. Practice examination – evaluate examination questions one through one, see accurate solutions and explanations.