Did you look closer of your UV in image mode? The UV coordinate sometime give a small error upon manipulating (Floating-point error).
And if you want a clear edge of checker pattern, change the interpolation method from Linear(Default) to Closest as below:
And for precisely assign UV, use your pivot point:
1. Unwrap your mesh
If your mesh is a clear plane with square and rectangular, a normal nuwrap can do the job, check if the UV mesh is rectangular and perpendicular in UV editor.
2. Set Pivot to 2D Cursor
Once you enter the UV editor with the mesh, you can see the UI panel on the right, there is a 2D Cursor similar to 3D Cursor, set it to (0,0) if the UV map can scale from origin.
Or you can choose any location once upon you know how the pivot point work.
3. Scale your UV to specified value by directly type in number (aspect ratial of your rectangular)
The number just like a virtual text input block. It is a pretty standard parser in a lot of application, even Photoshop use number pad to type the value of layer transparency. Type down the number, you can see it in the bottom of the status bar(if you didn't toggle off the bar)
This should work as below:
This method only solved the general checker pattern. If you want a more complicated mesh, I would recommend using script for it.
What does closest interpolation do and why is it necessary?
Closest interpolation give you a sharp image texture, while using linear method, your checker edge will be blur out if resolution is low. Not necessary, but I will do it if I want a sharp edge(it also improve a little tiny performance, just a little).
Why do we need to set the pivot point to 0.0?
You can set the pivot point to else where, if the UV origin you want to scale is known (you can read the vertex UV value in UI Panel). But most of the time Blender put unwrap vertex in 0.0, 0.0.
Am I right to change the interpolation in the node editor of my material?
Yes, node editor is the most common and general place you can change your shader behavior. The image textures node by default use linear for scaling, just because it is a common and light weight method to deal with 2D scaling. Feel free to change it if the linear method is too coarse for your rendering (I love Lanczos BTW, but Blender didn't implement it)